I have some JavaScript code in an HTML page with a button.(我在带有按钮的HTML页面中有一些JavaScript代码。)
I have a function called 'click()' that handles the onClick event of the button.(我有一个名为'click()'的函数来处理按钮的onClick事件。) The code for the button is as follows:(该按钮的代码如下:)<input type="button" onClick="click()">button text</input>
The problem is that when the button is clicked, the function is not called.(问题是单击按钮时,不会调用该函数。) What am I doing wrong here?(我在这做错了什么?) Thanks(谢谢) ask by Nate Koppenhaver translate from so