JS実行削除前の判定コード


一、
 
<script>
function del(){
if(confirm(" ")){
alert("yes");
}
else{
alert("no")
return;
}
}
</script>
<html>
<input type="button" value="del" onclick="del();">

</html>
二、
 
<a href='/console/oneYear.action?id=<s:property value="id" />'> </a>&nbsp;|&nbsp;<a href='javascript:delMonthMessage("<s:property value="twoid" />")' onclick="return confirm(' ?')"> </a>
三、
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>js - </title>
</head>

<body>
<p>
<script language="javascript">
function delcfm() {
if (!confirm(" ?")) {
window.event.returnValue = false;
}
}
</script>
<a href="http://www.lanrentuku.com/" onClick="delcfm()"> </a></p>
<p> : delcfm() , , “ ”, true , <a> ; “ ”, false ,<a> 。</p>
<p> , :<a href="http://www.lanrentuku.com" target="_blank"> </a></p>
</body>
</html>