标签:bar key data- cti data javascrip ref blank 其他
原文地址:http://blog.csdn.net/ywl570717586/article/details/53130863
今天处理html标签里的onclick功能的时候总是报错:Uncaught ReferenceError: dosave is not defined(…)
找了半天都没发现错在哪,最后发现原来是我写法不对,正确写法如下:
html:
js:
错误写法一般有以下两种,很致命:
和
为什么会这样,因为:
html页面调用js文件里的函数,写法必须为dosave = function (){}形式,其他方式写,html页面会搜索不到该函数。
[转]html页面调用js文件里的函数报错onclick is not defined处理方法
标签:bar key data- cti data javascrip ref blank 其他
原文地址:http://www.cnblogs.com/dirgo/p/7428581.html