Thursday, July 26, 2012

Simple javascript onclick not working



Here\’s the fiddle:


http://jsfiddle.net/5UXkA/


HTML:



<html>
<body>
<input type=\"button\" value=\"button\" onclick=\"test()\" />
</body>
</html>​


JavaScript:



function test() {
alert(\'hi\');
}​


As expected, it is not alerting the data!






Rating: 3 out of 5 based on 3 ratings



The post Simple javascript onclick not working appeared first on Javascript ASK.






via Javascript ASK http://javascriptask.phpfogapp.com/simple-javascript-onclick-not-working.html

No comments:

Post a Comment