Javascript
-
Use MouseOnClick event to hide the div. Hide the div as below: document.getElementById("div1").style.display="none" God is always with you.
-
Use MouseOnClick event to hide the div. Hide the div as below: document.getElementById("div1").style.display="none" God is always with you.
I know document.getElementById("div1").style.display="none" will hide when on particular mouse click but i want to hide the div when clicked on any where on the browser. wht is the event will be raised when clicked on any where on thw browser. how to add that event to hide function .
-
I know document.getElementById("div1").style.display="none" will hide when on particular mouse click but i want to hide the div when clicked on any where on the browser. wht is the event will be raised when clicked on any where on thw browser. how to add that event to hide function .
Call on onkeypress event in the body tag. < body onkeypress="Checkkeycode();" > function checkkeycode() { if( event.keycode==13 ) { return false; } else { return true; } } //Keycode value for enter key is 13. God is always with you.