onclick JS的错误写法
2018-04-10 本文已影响0人
九乡河的小香瓜
如图报了not defined 的错误
![](https://img.haomeiwen.com/i6221255/39aaf394238b5d00.png)
我的错误写法
<button onclick="a()"> </button>
js中 function a(){}
正确写法
js中
a=function(){}
如图报了not defined 的错误
我的错误写法
<button onclick="a()"> </button>
js中 function a(){}
正确写法
js中
a=function(){}