阅读背景:

Javascript 点击按钮 提示确认 确认后跳转网页 可传递参数

来源:互联网 

Javascript 点击按钮 提示确认 确认后跳转网页 可传递参数:

<html>
<head>
<script type="text/javascript">
function show_confirm(var)
{
var r=confirm("Press a button!");
if (r==true)
  {
  window.location.href='/go.html?url=https://test/?param='+var;
  }
else
  {
  alert("You pressed Cancel!");
  }
}
</script>
</head>
<body>

<input type="button" onclick="show_confirm({{var}})" value="Show a confirm box" />

</body>
</html><html>



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: