Simple Javascript Function Not Working In Jsfiddle August 21, 2024 Post a Comment I have the following HTML Code. Text1Text2Text3Solution 1: By default JSFiddle wraps the JS block into onLoad function:... leading to something like:window.onload = function() { functionTestCall() { alert("Test"); } }; CopyThis 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: FiddleIt 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"