一个javascript语句问题

来源:百度知道 编辑:UC知道 时间:2024/05/29 14:12:51
<input type="button" value="订单成功执行" style="height:30px; width:100px">

要的功能是点击这个按钮后会弹出“确定”,“取消”,如果点确定后转到一个指定页面去,取消就不执行··
如果要传递一个参数给指定页面可以吗?

例如传递一个id过去··是用ASP写的

<input type="button" value="订单成功执行" style="height:30px; width:100px" onclick="onRdirct()">

<script language="javascript">
function onRdirct(){
if(window.confirm("您确定要转入指定页面?")){
window.location.href="a.jsp";//a.jsp为指定跳转页面
}

}
</script>