网页的跳转在很多时候都非常的有用,下面的是两个简单的例子。仅供参考。
3 m; n. M- f6 F: x$ v方案一,用<meta>里直接写刷新语句:2 B+ @6 H4 a1 l7 n
<html>
+ q: S7 T2 F) S0 ?6 ]3 o5 }<head>& r" L2 ]1 W" c5 d( W
<meta http-equiv=content-language content=zh-cn>
* g) C' l9 k3 F6 L( |<meta http-equiv=content-type content=text/html; charset=utf8>! N! A7 W$ S& j F
<meta http-equiv=refresh content=5;url=http://www.xinongda.com/search>: s" p7 P W8 G$ |5 O! p) V! z6 B" y
<title>html网页自动跳转代码--西农大网站</title>* a0 q/ d$ {/ n1 I
</head>
( ~: O/ d& z: h; Z& \4 M4 Q' f9 X<body>$ O7 x- G' _9 b- D/ G( O
测试:html网页自动跳转代码<br/>% I3 t' q( [! w2 h7 J* c$ @) L
你可以在这里写下你想的一切东西!<br />
9 e! P; y) p# |- F4 c如:西北农林科技大学是一所985、211院校。<br />* ^, W) q! K; ` r
</body>
# W! Q$ b9 ]; d& G</html>
1 `+ ~6 X V6 J$ u9 X0 C5 N方案二,用javascript脚本来跳转
% D o4 w* y2 ^<html>
4 P2 X' ?- L* g% Q( _' q<head>
: J% P* u7 L: L9 L0 M: ?. T7 e<meta http-equiv=content-type content=text/html; charset=utf8>
; L. C' J. Y8 y; H F$ c<title>正在进入西农大网站</title>/ O# E' b/ b8 J; z! W2 y | Q: z
</head>
# Z `# T" ]5 |, ?( E+ a<body>
/ e7 {# ?! a2 S3 \$ F! h<form name=loading>
) b w4 F8 ~, h& _ <p align=center> <font color=#0066ff size=2>正在进入,请稍等</font><font color=#0066ff size=2 face=arial>...</font>
. `) U8 j( o; j3 I5 \<input type=text name=chart size=46 style=font-family:arial; font-weight:bolder; color:#0066ff; background-color:#fef4d9; padding:0px; border-style:none;>, \; H, K3 q: f7 D, _
<input type=text name=percent size=47 style=color:#0066ff; text-align:center; border-width:medium; border-style:none;>
3 z7 M* l# U% A) R. Q0 k<script> ; O s& U' L* [
var bar=0 9 }: f5 G6 b" O% ]9 p* [9 W
var line=|| 8 H. S8 F3 `7 n& R
var amount=|| ; _- w& E5 p& [) E; ~- ^
count()
! O* t, ]+ ]: d: w5 Jfunction count(){
2 n8 _8 [& v# t3 p$ X4 nbar=bar+2
) C5 J1 b- g9 f* eamount =amount + line % ~& |2 h) t- D: |9 f% y3 F6 @# q4 W
document.loading.chart.value=amount
O3 b3 n' m1 W+ p1 c edocument.loading.percent.value=bar+%
4 ?+ U+ }7 @3 i& ^if (bar<99) , j$ m4 i* c i$ C* k
{settimeout(count(),100);}
! M% y0 A; K3 O) q) x- welse
( Y/ r. A) y9 V% N% \. N{window.location = ;}
) A& N% m7 S) l( _# `, k t+ i0 H* p: c; o}</script>( M% Y) t- ?/ z
</p>; J6 [4 R6 W8 ]8 x
</form><p align=center>
8 E8 L6 ~* c6 |7 F* ]. Z测试:html网页自动跳转代码<br/>
- ]$ k6 y: m/ J# R& }你可以在这里写下你想的一切东西!<br />/ m4 L: d2 ~5 X
如:西北农林科技大学是一所985、211院校。<br /><br />$ n/ }$ e6 ?! C$ U w1 O" [
如果您的浏览器不支持跳转,<a style=text-decoration: none href=- T$ M4 ?4 g9 f5 m* @' A
><font color=#ff0000>请点这里</font></a>.</p>" {& H( a: r0 Y! y
</body>
& L/ @5 m U3 Z( r" K</html>/ C7 ?+ [1 M4 k! W4 H
0 b D+ t0 Y: f7 M) }: Q更多网页制作信息请查看: 网页制作 |
|