网页的跳转在很多时候都非常的有用,下面的是两个简单的例子。仅供参考。, \7 c* u- a0 H% m$ d
方案一,用<meta>里直接写刷新语句:. O, G- ]- y6 N0 y( x3 j3 e3 x8 C: g
<html>0 E" ~) j# N# n, f, y# p& t/ [! L
<head>
) N9 h5 b4 i& c4 d4 V<meta http-equiv=content-language content=zh-cn>
) y+ w5 T. s3 c<meta http-equiv=content-type content=text/html; charset=utf8>! g" g+ y: ^" e
<meta http-equiv=refresh content=5;url=http://www.xinongda.com/search>. N/ k( s5 E" X5 d& W/ f* a# F2 i/ T
<title>html网页自动跳转代码--西农大网站</title>5 |% b! M9 |" K
</head>
8 {+ l, y! a2 _6 ^/ w% Y& a2 L<body>; r! ?/ e) W- w- y; ?/ a! r5 Z4 S! Y L
测试:html网页自动跳转代码<br/>
+ t5 h1 F; k* h( B7 x6 \# q; i你可以在这里写下你想的一切东西!<br />
! y' P9 m# t9 J- S2 L1 l& g如:西北农林科技大学是一所985、211院校。<br />
5 P- T" a1 Q/ w/ r* g8 h& u</body>3 ~2 D# a: V/ ?; j- I. M% `5 I7 b
</html>
" ^/ X0 _4 z* q- L方案二,用javascript脚本来跳转
2 X/ w. C5 ?2 G1 [4 r2 @<html>( F" ^, J! K0 G$ S* {
<head>, ?; V% k9 J0 B
<meta http-equiv=content-type content=text/html; charset=utf8>- d: {% c4 \! x, d, F
<title>正在进入西农大网站</title>
4 @/ H7 W, d% j! i9 ]" J/ F</head>. P: p Z# A0 V$ B( ?1 O
<body>, j$ \; [' P# F D0 e+ u1 p
<form name=loading>6 R1 f5 t2 [/ l1 h( b! |. m: _
<p align=center> <font color=#0066ff size=2>正在进入,请稍等</font><font color=#0066ff size=2 face=arial>...</font>
5 Y0 d5 ^3 s a0 }5 i! y, Z- f3 {, M<input type=text name=chart size=46 style=font-family:arial; font-weight:bolder; color:#0066ff; background-color:#fef4d9; padding:0px; border-style:none;>2 v+ T( d9 p& F% Y" H3 m; B* w
<input type=text name=percent size=47 style=color:#0066ff; text-align:center; border-width:medium; border-style:none;>
$ y6 X( K/ ^8 q<script> 3 N0 u7 r( h+ J r" ]% i& V$ g3 ~
var bar=0 l; C8 v* ~+ g% ?- B. A: P6 B
var line=||
6 L, I6 E2 t2 Z9 evar amount=|| ( r* Q! x2 Y! R9 |3 o6 y Y- t
count() + C- J$ L& n( k9 X
function count(){
$ R. ]" ^# K% T7 W7 ~2 i& K _bar=bar+2
) _- b! D0 j& @amount =amount + line % h, U( v. Z9 ~8 G$ B
document.loading.chart.value=amount
3 I* i: h/ F+ e! o8 q4 A6 Ndocument.loading.percent.value=bar+%
" w5 K# ~/ o& a) w& h- N% D- {if (bar<99)
7 g& Y$ d, z$ p9 w{settimeout(count(),100);} + {6 }' M$ b' a3 V9 s- Y( L* p) c
else $ s3 ]0 a, D6 C1 ?3 a7 l7 u
{window.location = ;}
2 [# m1 d, `& L! j. ^& j7 u}</script>$ A: n6 b9 {+ S' @2 J) b6 x
</p>
# ^0 _& H, j" \) o9 a9 C( m</form><p align=center>
, m4 P+ j% }3 y2 @6 X, ^0 b0 t0 t测试:html网页自动跳转代码<br/>
. t( u3 k5 B: V4 b/ I/ h你可以在这里写下你想的一切东西!<br />; Q: \$ Y3 y6 x% {/ {
如:西北农林科技大学是一所985、211院校。<br /><br />
+ s# H1 h p. K% l4 L如果您的浏览器不支持跳转,<a style=text-decoration: none href=+ s* d2 u/ x5 V% v/ r( n# u
><font color=#ff0000>请点这里</font></a>.</p>: ^- m$ f6 E$ `7 E, ?" L
</body>
* {* o. q2 s5 @ s! K+ L</html>& r, N. H J. B+ I7 ]/ ]0 f
9 q6 G8 _/ k" t+ e9 w8 }: \更多网页制作信息请查看: 网页制作 |
|