<html:link href="blackBooks.do?method=delBook&ID=${b.bookId}"
onclick="dell()">删除</html:link>以上是程序的部分代码,链接做的是删除的操作,在javascript里怎么在弹出confirm提示框里选择否的时候,能阻止删除的操作,望高手指教,谢谢!
onclick="dell()">删除</html:link>以上是程序的部分代码,链接做的是删除的操作,在javascript里怎么在弹出confirm提示框里选择否的时候,能阻止删除的操作,望高手指教,谢谢!
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script language=JavaScript>
function del(){
if (confirm('delete?')){
location.href = "http://www.google.cn";
}else{
}
}
</script>
</head>
<body>
<a href="javascript:del();">del</a>
</body>
</html>