连锁反应confirm

<script>
function del(){
var flag = confirm("你真要删除么?");
if( flag ){
alert("我已被你抛弃了。")
}else{
alert("真好,我又可以继续陪着你。")
}
}
</script>
<body>
<input type="button" value="删除" onclick="del()">
</body>
原文地址:https://www.cnblogs.com/landen/p/6658275.html