Javascript Essentials Part 1


Close Window Script

Close Browser Window With Prompt
<a href="Javascript:self.close();" class="downlinks">Close website</a>
Without Prompt
<a href="#" 
onclick="window.opener=null; window.close(); return false">
thelinkbuttonorwhatever
</a>
Self Close With time (5000 for 5 sec.) Auto Close Browser Window With Prompt
<script language="javascript"> 
setTimeout("self.close();",5000) 
</script>
Self Close With time (3000 for 3sec.) Auto Close Without Prompt
<script language="javascript"> 
setTimeout("self.opener=null; self.close(); return false;",3000) 
</script>

Related Posts


Leave a Reply

Your email address will not be published. Required fields are marked *