Wednesday, June 5, 2024
 Popular · Latest · Hot · Upcoming
34
rated 0 times [  35] [ 1]  / answers: 1 / hits: 28653  / 13 Years ago, fri, august 12, 2011, 12:00:00

There is some code I wanted to put into JSFiddle. It didn’t work. Narrowing it down I can’t even get this simplest of code to work:



JSFiddle



function displaymessage() {
alert(Hello World!);
}


<form>
<input type=button value=Click me! onclick=displaymessage() />
</form>

<p>By pressing the button above, a function will be called. The function will alert a message.</p>


The alert box doesn’t show up in the JSFiddle.


More From » html

 Answers
6

http://jsfiddle.net/praveen_prasad/XNJxT/14/



Js fiddle so something like this to whatever you write



window.addEvent('load',function(){

//Your code


});


enter


[#90642] Thursday, August 11, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
monica

Total Points: 308
Total Questions: 102
Total Answers: 109

Location: Saudi Arabia
Member since Sat, Aug 20, 2022
2 Years ago
;