js弹出提示框并跳转页面
时间:2014-07-10 10:15:35
收藏:0
阅读:248
1。提示框有两个选择项,点确定跳转,取消停留在原页面
ScriptManager.RegisterStartupScript(Page, this.GetType(), "", "<script>if(confirm(‘请登录
?‘)){location.href=‘login.aspx‘};</script>", false);
2.提示框只有一个确定按钮,跳转到指定页面
ScriptManager.RegisterStartupScript(page, this.GetType(), "", "<script>alert(‘请登录?‘);location.href=‘login.aspx‘</script>", false);
或者是:
<script language="JavaScript">
alert(‘提示信息‘);-------------------------提示框内容
location.href=‘https://125.69.90.54/‘;-----------------------点击按钮后跳转页面url
document.onmousedown=click
</script>
评论(0)