本帖最后由 imakemoney 于 2015-4-13 23:44 编辑
; M) Z5 ^* m$ O& ^+ `1 F9 h1 r5 N, G+ \
js 跳转,技术指导:
+ W- @# @6 W1 B4 s6 W1.在原来的窗体中直接跳转用
. B7 {! B/ k! @: b v/ Pwindow.location.href="你所要跳转的页面";
) d9 a) ^! P1 I; _$ ~6 d0 {2、在新窗体中打开页面用:& ?7 `" c8 x- I5 P2 V/ s
window.open('你所要跳转的页面'); window.history.back(-1);返回上一页
! L$ ~' e1 a" Q# O: X7 s. |3、一些用法. X; K$ P8 k) c! y
按钮式:
$ y7 O& E) a% Q5 G<INPUT name="pclog" type="button" value="/GO">
% a+ _" {+ s( C$ o链接式:<a href="javascript:history.go(-1)">返回上一页</a>
D0 U6 y1 x! F: E3 W/ O<a href="<%=Request.ServerVariables("HTTP_REFERER")%>">返回上一页</a>
- R' p2 P# z, F) k4 ?/ U直接跳转式:
# U# y# D* |# b7 @<script>window.location.href='连接地址';</script>9 c2 v9 t) v5 I5 g" y
开新窗口:( x$ N# K: l( i* A" ~( S
<a href="/javascript:">123</a>
0 o( c. z/ ^; g) e/ w<SCRIPT> 0 A) m% w% ^2 R9 H* ]* ^+ a
<!--
) A2 u; l, r. ~4 t# Z. S0 dwindow.open 7 D9 |4 D7 U2 G+ G; X" _/ z W
r8 j8 d; _& I% H4 u* a" q( n('page.html','newwindow','height=100,width=400,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, - v4 _9 w7 C1 A" M d! a8 N
* z3 i6 Q- x4 O) P, R
resizable=no,location=no, status=no')
5 W; Y/ j! K. E5 ]//写成一行 6 y& |5 ?4 t4 F `8 ?% k! f. l) d, }
-->
* [" ~# @. n/ k. R4 @7 o$ l5 N9 ^</SCRIPT>
' |& m( \4 t% }5 b$ H/ x7 c$ w; L& z6 P$ }5 s) ?" S
脚本运行后,page.html将在新窗体newwindow中打开,宽为100,高为400,距屏顶0象素,屏左0象素,无工
$ @8 K L7 Z) A2 R2 f% T t
% }! O+ O J. i# Q" a# W. k
专门做了一个JS 跳转测试页面(http://www.bbwwe.com/)
8 |& F# q, A3 ~, r( r* L+ X
用的代码是: ( ^9 M1 h$ n. P, S, F1 j
<a >JS 跳转测试</a>* g& U1 F1 S5 \; b o9 [
- <a onClick="window.open('http://www.advertcn.com/','','height=500,width=611,scrollbars=yes,status =yes')">JS 跳转测试</a>
复制代码
8 N+ v5 _2 h9 M: D* }& E g+ q l2 \
- r# A* `; z& w7 L
|