JavaScript call function not working - simple example -
i trying call javascript function (plain old js.. not jquery or other library) having issues. seems simple maybe doing silly. have html element id of testbutton. here javascript..
document.getelementbyid("testbutton").onclick = function() { makerequest('test.html'); }; function makerequest(url) { alert('clicked'); }
it's onclick
, not onclick
document.getelementbyid("testbutton").onclick = function() { makerequest('test.html'); }; function makerequest(url) { alert('clicked'); }
Comments
Post a Comment