js弹出提示框并跳转页面

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>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
  • 2021-10-26
  • 2021-08-20
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-08
  • 2021-09-02
  • 2022-12-23
相关资源
相似解决方案