/*这里是HTML代码*/
<a href="opera.php?do=delete&tid=2" id="del">删除</a><script type="text/javascript">
window.onload = initAll;
function initAll(){
document.getElementById("del").onclick = makSure;
}
function makSure(){
if(confirm("确定要删除问题吗?")){
// 如果确定则跳转到操作页面
window.location = this;
}else{
//这里怎么写:取消则停留在当前页面
}
}
</script>
不懂怎么写confirm取消后,让页面停留在当前页面。
请教各位朋友,谢谢!谢谢!