网页的跳转在很多时候都非常的有用,下面的是两个简单的例子。仅供参考。, G8 {/ `4 `1 ~1 ~1 P
方案一,用<meta>里直接写刷新语句:+ j' z8 U: D' y; @1 b% B- d% g
<html>9 B. U, P( O0 D1 A3 V
<head>. ]5 U8 [8 s& A# b; G4 C
<meta http-equiv=content-language content=zh-cn>( D7 P4 f- ^! W, _2 I" B$ h/ y
<meta http-equiv=content-type content=text/html; charset=utf8>1 h1 M) [7 g5 q2 O5 W+ p
<meta http-equiv=refresh content=5;url=http://www.xinongda.com/search>
' k) Y4 ^' ~0 Z, Q% ~# {1 C<title>html网页自动跳转代码--西农大网站</title>
. ^" |2 R5 n& H7 o: O% Y</head>4 y: ]% f) c, q! G" R3 ^. c
<body>
y! \" R5 O) S3 p/ r* I2 |测试:html网页自动跳转代码<br/>+ l0 z4 s& W* P" J: Z: Z+ g
你可以在这里写下你想的一切东西!<br />
% K. @: J5 k( v" ]如:西北农林科技大学是一所985、211院校。<br />& B! F" @/ b* K, l0 i' Q7 O" j+ k
</body>! L( B9 ?1 L. h% e( n
</html>
1 }+ B$ L; x: z' @: b, m, J( P方案二,用javascript脚本来跳转
9 ]9 o3 {7 D- g% o2 Z8 o" ]<html>9 |$ g, W/ I* @5 ~1 Q
<head>
3 X1 K+ J" f' \1 Z N9 E& e<meta http-equiv=content-type content=text/html; charset=utf8>) E! U+ h, ]: J4 U
<title>正在进入西农大网站</title>
7 o) u+ E! S2 S0 ^- X) o% P</head>! h: ]6 }. h; Y+ {; Z
<body>
) q: T9 S2 O, a6 w2 i<form name=loading>
5 H! s. m6 x* j' _2 @$ {3 O <p align=center> <font color=#0066ff size=2>正在进入,请稍等</font><font color=#0066ff size=2 face=arial>...</font>
9 n4 d$ v! M2 Y, p<input type=text name=chart size=46 style=font-family:arial; font-weight:bolder; color:#0066ff; background-color:#fef4d9; padding:0px; border-style:none;>
9 q$ j7 G% |+ H, q& U<input type=text name=percent size=47 style=color:#0066ff; text-align:center; border-width:medium; border-style:none;> ~6 k) j5 {$ z- _: }
<script>
$ q# {: N& ]8 B9 K+ evar bar=0 6 j; @2 H t. R% V c
var line=||
; G2 h% h6 t+ N& b1 l/ w yvar amount=||
9 v4 g- f* @2 u. Rcount()
/ o- a3 E5 B. {( v0 @* L9 n4 I; X' @function count(){
) d- ^% c, d, i+ F5 b+ o/ zbar=bar+2
# }, z V1 A/ e9 S8 jamount =amount + line
( d3 R+ G. Z* Ndocument.loading.chart.value=amount 7 A9 L+ ?! Q6 z- P- x
document.loading.percent.value=bar+%
, p; _4 p+ k0 a5 xif (bar<99)
, ~/ U/ y4 H! f+ L" f{settimeout(count(),100);} 9 [$ `+ X+ f" D9 `* U0 R/ u
else 5 V! k) P6 ~; G8 Q
{window.location = ;}
* U5 ?0 N9 \# ^/ l3 ]7 P}</script>
* S+ V+ s' W o% M+ k: u/ Q5 X </p>
: C" E, f& f9 t& ^</form><p align=center>- l+ w8 a. F+ k2 R4 v) m4 o
测试:html网页自动跳转代码<br/>$ L0 Q: [% y+ L: r
你可以在这里写下你想的一切东西!<br />
9 W' }1 @2 k0 d8 C7 i如:西北农林科技大学是一所985、211院校。<br /><br />! X: `; V- i, N+ Y% u
如果您的浏览器不支持跳转,<a style=text-decoration: none href=
. Q/ {9 h+ u" H! N><font color=#ff0000>请点这里</font></a>.</p>
! P- L5 [: p+ h4 v$ \</body># F4 b0 y7 A) L$ H* G5 P. [
</html>
^5 v) r1 A& f8 K" t6 t* [# u" i, u- o# K" o
更多网页制作信息请查看: 网页制作 |
|