我正在尝试制作jsfiddle,我的onclick在jsfiddle中不起作用。我的代码出了什么问题?
<input value="press" type="button" onclick="myclick()">
function myclick(){
alert("myclick")
}http://jsfiddle.net/hiteshbhilai2010/gs6rehnx/11/
编辑
我尝试了No wrap - In head,并再次尝试使用document.ready,它在jsfiddle中再次不起作用
ERROR - Uncaught ReferenceError: myclick is not defined http://jsfiddle.net/hiteshbhilai2010/33wLs160/6/
我已经用已经存在的问题here进行了检查,但是当我在jsfiddle中尝试它时,我的问题发生了。
谁能帮帮我....thanks
发布于 2014-10-13 04:48:55
<input value="press" id='a' type="button">
document.getElementById('a').onclick = function() { alert(1); }http://jsfiddle.net/gs6rehnx/12/
https://stackoverflow.com/questions/26329761
复制相似问题