Js jump page method summary

  • 2020-03-30 01:36:58
  • OfStack

Js jump page method daqo
< Span id = "tiao" > 3 < / span> < A href = "javascript: the countDown" > < / a> Xiangzi's net house; Automatic jump after seconds... < HTTP - equiv = meta refresh the content = 3; Url = '/ search/billsearch. JSP < / ul>

< ! -- script begins -->
< Script language = "javascript" type = "" >
The function countDown (secs) {
Tiao. The innerText = secs;
If (-- secs> 0)
    SetTimeout (" countDown (" + secs + ") ", 1000);
}
CountDown (3);
< / script>
< ! -- end of script -->

Push button:
< INPUT name="pclog" type="button" value="GO" onClick="location.href='//www.jb51.net/'">

Link type:
< A href = "javascript: history. The go (1)" > Step back < / a>
< A href = "< % = Request. ServerVariables (" HTTP_REFERER ") % >" > Step back < / a>

Direct jump:
< Script> Window. The location. Href = '/ / www.jb51.net; < / script>

Open a new window:
< A href = "javascript:" onClick = "window. The open (' / / www.jb51.net ', ' ', 'height = 500, width = 611, scrollbars = yes, status = yes')" > Xiangzi net house < / a>

JS jump page reference code

The first:
< Script language = "javascript" type = "text/javascript" >
Window. The location. Href = "login. JSP? Backurl = "+ window. The location. Href;
< / script>

The second:
< Script language = "javascript" >
Alert (" return ");
Window. The history. The back (1);
< / script>

The third:
< Script language = "javascript" >
Window. Navigate (" top. JSP ");
< / script>

Fourth:
< Script language = "JavaScript" >
The self. The location = 'top. HTM';
< / script>

Fifth:
< Script language = "javascript" >
Alert (" illegal access!" );
Top. Location = 'xx. JSP;
< / script>

= = = = = javascript pops up a selection box to jump to another page = = = = =
< Script language = "javascript" >
< ! --
The function logout ()... {
) are you sure you want to be deactivated Yes - select ok, no - select cancel "))... {
Window. The location. Href = "logout. Asp? Act = logout"
}
}
- >
< / script>

= = = = = = javascript prompt box to jump to another page = = = = =
< Script language = "javascript" >
< ! --
The function logout ()... {
Alert (" are you sure you want to log off?" );
Window. The location. Href = "logout. Asp? Act = logout"
}
- >
< / script>


Related articles: