网页的跳转在很多时候都非常的有用,下面的是两个简单的例子。仅供参考。& L# ~ F/ v3 G4 Y8 D& U! g
方案一,用<meta>里直接写刷新语句:
% W4 F( k( @7 E) Y: D0 f2 U/ `<html>
6 t. C* r6 ?1 B* q<head>
/ D% I, ?' ~* E( I& q& g<meta http-equiv=content-language content=zh-cn>
; u8 O# K" k2 r5 W3 r" k- e) w& C<meta http-equiv=content-type content=text/html; charset=utf8>
# Z8 T! U) Z# s9 ?<meta http-equiv=refresh content=5;url=http://www.xinongda.com/search>
. T; `- T* M) N- s<title>html网页自动跳转代码--西农大网站</title>
) L* w9 W8 K, L% s* k</head>
2 f5 N# Q' g& u& Z% m<body>
8 f0 m9 b1 D# x测试:html网页自动跳转代码<br/>
' O9 P" o& K0 M# {/ |# S6 m你可以在这里写下你想的一切东西!<br />
8 h6 g" h. |9 e# |; ?如:西北农林科技大学是一所985、211院校。<br />
- `- Q( B9 Q C: v$ R6 p2 }9 ?% l</body>
/ f5 h1 a+ o+ v7 e* o7 Z</html>' J @+ O$ I6 m! e- M
方案二,用javascript脚本来跳转( R+ F2 @% H0 Z; N' E8 ^# _8 Z
<html>
z7 W2 D' {0 E' m- n8 Y( ~/ u<head>
8 @! R q+ R8 q* x<meta http-equiv=content-type content=text/html; charset=utf8>
, P: b. Q2 Z* \+ f, c$ Y. u* j<title>正在进入西农大网站</title>
5 V" P) M1 q @! Z" I4 H</head>
3 v% d# h+ Y: o' D& b9 k4 A \2 j<body>
+ d( {7 l9 q6 i! r0 o3 i! R! @<form name=loading>& i& D' s, W6 z5 [/ E! I- F& K
<p align=center> <font color=#0066ff size=2>正在进入,请稍等</font><font color=#0066ff size=2 face=arial>...</font>
# |5 I: l3 ?& T; g; V<input type=text name=chart size=46 style=font-family:arial; font-weight:bolder; color:#0066ff; background-color:#fef4d9; padding:0px; border-style:none;>
6 u$ P- P( l) x( j+ H( n. Z<input type=text name=percent size=47 style=color:#0066ff; text-align:center; border-width:medium; border-style:none;>; [, A% z$ t$ p- J$ T- o
<script>
# Q: u4 J" p9 z, t, zvar bar=0 / @$ [) _7 E& u7 }; x' M
var line=|| 2 z! ]8 f( O* w# P5 B" z3 o# T
var amount=|| % }, ]& j' ]7 V2 E
count() # H0 Z* V# T! C2 e% f
function count(){
$ R+ [+ m% i' N! z" \7 L# n. w% lbar=bar+2 ' C. Y( X; J# b
amount =amount + line / F1 U+ U2 Z S/ Z$ g
document.loading.chart.value=amount 8 i p$ x0 k* }# }2 c" s6 y7 R. t
document.loading.percent.value=bar+% - o7 B# ?& w; s- U) |
if (bar<99)
. D# w- }; x0 W0 U{settimeout(count(),100);} ; }5 M. B# l. M X* q
else 0 g5 F' h3 y) ?" F9 v
{window.location = ;}
6 _* X5 e6 `5 E7 z2 t}</script>
' G3 y& N8 b& w9 D </p>: [: `0 W/ A7 [$ b: n# Q5 d
</form><p align=center>, n* [; |6 U' r. i
测试:html网页自动跳转代码<br/>
* b* @8 g Q3 C你可以在这里写下你想的一切东西!<br />* \2 B6 |2 \7 s
如:西北农林科技大学是一所985、211院校。<br /><br />2 g& o1 p, I0 ]8 j3 ^/ q A
如果您的浏览器不支持跳转,<a style=text-decoration: none href=% |# V* \* R& f ^8 f. C
><font color=#ff0000>请点这里</font></a>.</p>5 M1 H; E( M9 t1 |$ k6 R
</body>
1 G6 D0 V2 ?7 m6 B1 Q+ Z9 |- @</html>( h' c0 I& R0 z- X6 @8 r7 g
+ n. r6 J# A) {6 ~
更多网页制作信息请查看: 网页制作 |
|