Jump to content
xisto Community
Sign in to follow this  
iGuest

8 javascripts are usefull

Recommended Posts

1.No right click

<script LANGUAGE="JavaScript"> function click() { if (event.button==2) { alert('DO NOT STEAL!'); } } document.onmousedown=click // --> </script>
2.Open popup when the web loads:

<script language="JavaScript"> <!-- window.open('http://media.vdc.com.vn'); // --> </SCRIPT>
3.Open popunder

<script language="JavaScript"> <!-- Hide script in old browsersif(navigator.appName.indexOf("WebTV")==-1) { myWin = open('', 'winin','toolbar=0,menubar=0, scrollbars=1,status=0,resizable=1,width=80,height=  430'); myWin.blur(); myWin.location = 'http://internet.vdc.com.vn'; var shut=true; } // End--> </script>
4.Automically add bookmark

<a href="javascript:window.external.AddFavorite('http://internet.vdc .com.vn/', 'My Site Title');">Bookmark this Site!</a>
5.Back/Forward/Reload

<a href="javascript:history.back(1)">Go Back</a> Forward: <a href="javascript:history.forward(1)">Go Forward</a> Refresh: <a href="javascript:location.reload(1)">Refresh</a>
6.Print the page

<a href="javascript:window.print()">Print This Page</a>
7.Menu

<script LANGUAGE="JavaScript"> <!--- hide script in old browsers function jumpBox(list) {location.href = list.options[list.selectedIndex].value} //end---> </SCRIPT> <FORM> <SELECT> <OPTION selected>------------------- <OPTION VALUE="firstpage.html">One <OPTION VALUE="secondpage.html">Two </SELECT> <INPUT TYPE="button" VALUE="Go" onClick="jumpBox(this.form.elements[0])"> </FORM>
8.Use this, you'll like:

<script LANGUAGE="JavaScript"> MouseOver("firstimage.gif","secondimage.gif", "width=100 height=30 border=0 alt='Click Here'", "yourpage.html"); </SCRIPT>

Share this post


Link to post
Share on other sites

Number 4 will only work in IE.Numbers 2&3 will most likely be blocked by the Mozilla Popup blocker in Mozilla.Number 8 won't work because MouseOver is not a built-in function. You'll have to define it yourself.And thank you for putting the code into code tags! :lol:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.