function - Why isn't this onclick JavaScript call working? -
html
<div id="test"></div> <input type="button" value="go" onclick="test()" />
javascript
function test() { alert("test!"); }
fiddle
please @ one, jsfiddle code frames separation:
inline event handler not working in jsfiddle
of course, if running same code embedded on plain html works normally, having alerted popup appearing.
<!doctype html> <html> <head> <script> function test() { alert("test!"); } </script> </head> <body> <div id="test"></div> <input type="button" value="go" onclick="test()" /> </body> </html>
Comments
Post a Comment