Today when exporting Excel, I used the input hidden of the Form form to distinguish export and search. At the beginning, the function name of the onClick event in js is the same as the id in hidden. As a result, an error is reported: The object in the line where the function is called does not support this attribute.
After searching for a long time, I couldn’t find the reason. At first, I thought it was a wrong letter, only to find that the js function was not executed at all. Later, I couldn't directly call other functions, and found that it worked. I thought it was because of the function name, so I changed the function name before it worked. Then I changed the id in the input to be the same as the function name, and another error occurred. Before verifying it with the following example, I always thought it was a bug in ThinkPHP template parsing. Because of the following example, it is confirmed that the function name in js cannot be the same as the id in the element.
For example:
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; CIBA; .NET CLR 2.0.50727)
Timestamp: Thu, 27 Jan 2011 13:30:09 UTC
Message: Object does not support this property or method
Lines: 17
Characters: 1
Code: 0
URI: file:///C:/Documents and Settings/Administrator/Desktop /test.html