• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • YouClaw
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

Dotnet之旅

  • 博客园
  • 联系
  • 订阅
  • 管理

公告

View Post

ASP.NET中实现弹出消息框后跳转至另一带参数页面(Javascript)

  Response.Write("<script language='javascript'>alert('请输入用户名或密码!');window.location='BillDayDetail.aspx?UserID="+UserID+ "';</script>"); 

注意Windows.location而非href.location

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


=====javascript中弹出提示框跳转到其他页面=====
<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
}
}

posted on 2007-06-06 11:11  浮游  阅读(1842)  评论(0)    收藏  举报

刷新页面返回顶部
 
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3