寒窗轩,寒川的个人网络博客,记录互联网事,学习网络编程、分享工作经验、人生感悟,包括但不限于程序代码、数据库、Office办公、随笔等内容。

常见javascript跳转方式

第一种:   
<script language="javascript" type="text/javascript">window.location.href="index.asp";</script>
<script language="javascript" type="text/javascript">window.location.href="login.asp?backurl="+window.location.href;</script>
第二种:   
<script language="javascript">alert("返回");window.history.back(-1);</script>
第三种:  
<script language="javascript">window.navigate("top.asp");</script>
第四种:  
<script language="JavaScript">self.location='top.htm';</script>
第五种:  
<script language="javascript">alert("非法访问!");top.location='index.asp';</script>
=====javascript中弹出选择框跳转到其他页面=====
<script language="javascript">
<!--
function logout()...{
if (confirm("你确定要注销身份吗?是-选择确定,否-选择取消"))...{
window.location.href="logout.asp?act=logout"
}
}
-->
</script>


=====javascript中弹出提示框跳转到其他页面=====
<script language="javascript">
<!--
function logout()...{
alert("你确定要注销身份吗?");
window.location.href="logout.asp?act=logout"
}
-->
</script>

=================================
按钮式:
<INPUT name="pclog" type="button" value="GO" onClick="location.href='http://hi.baidu.com/hanchuan'">
链接式:
<a href="javascript:history.go(-1)">返回上一步</a>
<a href="<%=Request.ServerVariables("HTTP_REFERER")%>">返回上一步</a>
直接跳转式:
<script>window.location.href='http://hi.baidu.com/hanchuan';</script>
开新窗口:
<a href="javascript:" onClick="window.open(http://hi.baidu.com/hanchuan','','height=500,width=611,scrollbars=yes,status=yes')">寒窗轩</a>

程序 2009-06-20 22:16:49 53 0 7119 html脚本编程
文章写得不错?我是土豪我要在线打赏!
在线打赏

昵称:

验证码:验证码

评论:

文章分类
系统
程序
数据
Office
随笔
热门文章
VB.net开发的word转pdf的小工具
使用python把word转成pdf
文章推荐
免责声明
关于博主
开篇第一章
随机推荐
php Call-time pass-by-reference has been deprecated 错误解决方案
一款绝佳的IM即时通软件MirandaIM
Yahoo电邮纯为鸡肋
Qzone日志插件发布了
sql随机排序
asp+access+wml网页编程:asp读取access数据分页输出到手机客户端
WAP写博客测试
腾讯云服务器快照恢复删除的数据
调整PHP和MySQL的时区,实现同步显示中国时间
删除MySQL数据库中二进制日志的3种方法
友情连接
春燕网络
谢润的博客
企安文档