How To create On/off button in Javascript
<p>I am newbie so this question may be sound stupid. I want to load a javascript function using  <code>&lt;body onload="function()"&gt;</code> but i want to handle this event through on/off switch so if the switch is on(by default) the "onload" event will call the function and if the switch is set to off it will not.
Thanks in advance!</p>
