寒窗轩,寒川的个人网络博客,记录互联网事,学习网络编程、分享工作经验、人生感悟,包括但不限于程序代码、数据库、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 7 0 5614 html脚本编程
文章写得不错?我是土豪我要在线打赏!
在线打赏

昵称:

验证码:验证码

评论:

文章分类
系统
程序
数据
Office
随笔
热门文章
Excel文件内容很少,但文件很大,打开很慢、很卡怎么办?
Excel动态引用各表格指定单元格数据
开篇第一章
Excel文件内容很少,但文件很大,打开很慢怎么办?
如何利用python修改文件的创建时间,修改时间,访问时间
发现一个好网站——春燕文档
Ubuntu22.04中用thunar替换默认文件管理器,提示无法启动“TerminalEmulator“的首选应用程序
MySQL如何按每个分类查询10条数据,即MySQL如何每个分类查询10条数据
文章推荐
请不要奇怪,为什么最近博客的文章是几年前的内容
免责声明
关于博主
开篇第一章
随机推荐
html读取xml并分页显示
我也玩玩php多线程
常见javascript跳转方式
如何在HTML文件中嵌入另一文件内容(*.htm , *.txt),非Iframe
搬校区了
C语言写的一个万年历
excel无重复排序,如何提取排名前5的学生对应姓名
php过滤html标签
access数据库密码破解太容易了。
中秋
友情连接
春燕网络
春燕文档
谢润的博客