Simple Javascript Function Not Working In Jsfiddle June 24, 2022 Post a Comment I have the following HTML Code. Text1 Text2 Text3 Solution 1: By default JSFiddle wraps the JS block into onLoad function: ... leading to something like: window.onload = function() { function TestCall() { alert("Test"); } }; Copy This means that your TestCall method is getting out of global scope and is not accessible from HTML attributes. Change the option to No wrap - in <head> or No wrap - in <body> and it will work. DEMO: http://jsfiddle.net/Q9ukX/3/ Solution 2: Fiddle It works if you change the settings down the side. Change it from onLoad to No Wrap - in body or No Wrap - in head. Share Post a Comment for "Simple Javascript Function Not Working In Jsfiddle"
Post a Comment for "Simple Javascript Function Not Working In Jsfiddle"