网页的跳转在很多时候都非常的有用,下面的是两个简单的例子。仅供参考。' O1 R) i7 z, X; B8 A
方案一,用<meta>里直接写刷新语句:" q# _ J! D$ `) k5 A/ F$ T; a
<html>
8 K+ a( p& @) ~4 H' Q! V: \+ Z<head>
1 J1 u1 A. e9 D, L* [ m4 V* q<meta http-equiv=content-language content=zh-cn>% q- V! D* ~3 x: D* ~, B
<meta http-equiv=content-type content=text/html; charset=utf8>
0 T6 `7 \ ^8 [) \# F<meta http-equiv=refresh content=5;url=http://www.xinongda.com/search>9 p5 @( Q# l- z+ x. S& G$ H
<title>html网页自动跳转代码--西农大网站</title>. i- {, D2 Z0 K4 e* n# a
</head>4 S, J( A) U' J+ v
<body>5 [9 w6 q0 N( X" s; V
测试:html网页自动跳转代码<br/>
% w% V( J, F3 g" Y" r) E% f2 b8 K0 R你可以在这里写下你想的一切东西!<br />
2 u5 o0 h/ a5 C5 k, y如:西北农林科技大学是一所985、211院校。<br />! K, F9 U1 L/ b# _" M
</body>8 @4 W: Y8 T( _( ]
</html>+ W: l( O% a% Q! O: [
方案二,用javascript脚本来跳转
) D# t7 x7 W' z8 G. n8 ~<html>
0 V5 g& ?! O; A<head>
& Q3 o7 ?# r. L0 l' w: ~8 Y<meta http-equiv=content-type content=text/html; charset=utf8>
7 H, s# T+ Y6 ]! P! V' ]<title>正在进入西农大网站</title>
3 l' _/ J: h O. h* w7 [$ ]</head>, T$ F d# p4 S- ?4 g6 k
<body>3 J) M) d% G2 t
<form name=loading>1 Q4 C( n% e/ b
<p align=center> <font color=#0066ff size=2>正在进入,请稍等</font><font color=#0066ff size=2 face=arial>...</font>
2 S8 C& @; O R# {' U0 \1 D( a<input type=text name=chart size=46 style=font-family:arial; font-weight:bolder; color:#0066ff; background-color:#fef4d9; padding:0px; border-style:none;>
1 h3 [) p `, J, j1 x2 U<input type=text name=percent size=47 style=color:#0066ff; text-align:center; border-width:medium; border-style:none;> ~9 S3 J- @5 u
<script> * r& u- |7 @/ D- I- ^9 h1 I" W
var bar=0 # t7 \- R. j& `" L5 V( M
var line=||
. N. Y2 q0 `/ Vvar amount=||
+ n- c7 H$ P) pcount() 0 w& b1 ` v7 v5 I1 o
function count(){
s4 i+ E( B! w; e4 y6 kbar=bar+2
8 R2 S" U0 @% R5 f4 s9 Bamount =amount + line & L1 c4 X( x& u
document.loading.chart.value=amount
3 U: r; T) k- q; E9 K, ydocument.loading.percent.value=bar+% , g. c ?3 F* S0 J/ L \0 X
if (bar<99) $ n* X+ B: |7 Q% h
{settimeout(count(),100);}
2 i+ u% ]% g. f; f5 m% {3 I) ^3 kelse 0 \6 k. a* [9 W: y$ t9 h
{window.location = ;}
8 S; k; R6 G! r) ^" V; ~}</script>5 ]4 _) r0 j% T+ N n, D
</p>
8 L% e2 A& ?! x/ s4 u, h6 V</form><p align=center>
7 X9 @ K0 x/ L' b8 D/ {测试:html网页自动跳转代码<br/> G4 P! b1 L: F
你可以在这里写下你想的一切东西!<br /> K, s. I2 K- ?$ q
如:西北农林科技大学是一所985、211院校。<br /><br />/ Z( p0 _) X8 q$ w
如果您的浏览器不支持跳转,<a style=text-decoration: none href=) u% {" U& h1 U3 M" d5 T" A
><font color=#ff0000>请点这里</font></a>.</p>, j3 |; o9 T% J+ c
</body>; P, n5 {1 q+ e
</html>' Q" [0 ]/ _$ x/ h: E* K
7 |7 ?! i3 R& j: g/ {* x+ x0 @( V% e: ^0 S更多网页制作信息请查看: 网页制作 |
|