javascript - Can't execute simple JS by onclick from a button -


this embarassingly simple. haven't touch js while , can't while clicking on button...

the fiddle shows mean.

click below <div id='holder'></div> <input type='button' value='below' onclick='onclick()'>  function onclick() {   alert('beep'); } 

smack me if it's obvious. is...

you need define function before assign onclick. see here, have updated fiddle.

additionally have commented jquery code, didn't think relevant.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -