ASP

asp跳转大汇总

第一种:
<script language=”javascript” type=”text/javascript”>
window.location.href=”login.jsp?backurl=”+window.location.href;
</script>

第二种:
<script language=”javascript”>
alert(“返回”); window.history.back(-1);
</script>

第三种:
<script language=”javascript”>
window.navigate(“top.jsp”);
</script>

第四种:
<script language=”JavaScript”>
self.location=’top.htm’;
</script>

第五种:
<script language=”javascript”>
alert(“非法访问!”);
top.location=’xx.jsp’;
</script>

javascript中弹出选择框跳转到其他页面
<script language=”javascript”>
function logout(){
if (confirm(“你确定要注销身份吗?\n是-选择确定,否-选择取消”)){ window.location.href=”logout.asp?act=logout” }}
</script>

<script language=”javascript”>
function logout(){ alert(“你确定要注销身份吗?”);
window.location.href=”logout.asp?act=logout”}
</script>

ASP中直接跳转到其他页面
<% response.redirect “logont.asp” %>

Html中确认后弹出新页面
function Del(id){
if (confirm(“你确定要删除吗?”)) {
window.open(“otherfile.asp?ID=”+id+”&act=del”,”top”,”width=640,height=400″) }}

Html中确认后跳转到其他页面
function Del(URL)
{ if (confirm(“你确定要删除吗?”)) {
//URL=”otherfile.htm” window.location.href=URL }}

按钮式:  
<input name=”pclog” type=”button” value=”GO” onClick=”location.href=’http://asdfa.cn/'”>

链接式:  
<a href=”javascript:history.go(-1)”>返回上一步</a>   
<a href=”<%=Request.ServerVariables(“HTTP_REFERER”)%>”>返回上一步</a>

直接跳转式:
<script>window.location.href=’http://www.asdfas.cn’;</script>

开新窗口:

<a href=”javascript:” onClick=”window.open(‘http://www.asdasa.cn/235.html’,”,’height=500,width =611,scrollbars=yes,status=yes’)”>ddasdfasd</a>
1.
<script language=”javascript”> window.location = “http://www.baidu.com”;</script>
2

<script language=”javascript”> document.location = “http://www.baidu.com”;</script>
3: (带进度条)
<html><head><meta http-equiv=”Content-Language” content=”zh-cn”><meta HTTP-EQUIV=”Content-Type” CONTENT=”text/html; charset=gb2312″><title>跳转到baidu.com</title></head><body><form name=loading><p align=center><font face=Arial color=#0066ff size=2>loading…</font>
<input style=”PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: bolder; PADDING-BOTTOM: 0px; COLOR: #0066ff; BORDER-TOP-style: none; PADDING-TOP: 0px; FONT-FAMILY: Arial; BORDER-RIGHT-style: none; BORDER- LEFT-style: none; BACKGROUND-COLOR: white; BORDER-BOTTOM-style: none” size=46 name=chart><br /><input style=”BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; COLOR: #0066ff; BORDER-BOTTOM: medium none; TEXT-ALIGN: center” size=47 name=percent><script language=”javascript”>var bar=0var line=”||”var amount=”||”count()
function count(){ bar=bar+2 amount =amount + line document.loading.chart.value=amount document.loading.percent.value=bar+”%” if (bar<99){ setTimeout(“count()”,100); }else{ window.location = “http://www.baidu.com/”; }}</script></p></form></body></html>

分类: ASP

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

相关文章

开始在上面输入您的搜索词,然后按回车进行搜索。按ESC取消。

返回顶部