one,
Copy code code as follows:
<script>
function del(){
if(confirm("Confirm to delete")){
alert("yes");
}
else {
alert("no")
return;
}
}
</script>
<html>
<input type="button" value="del" onclick="del();">
</html>
two,
Copy code code as follows:
<a href='/console/oneYear.action?id=<s:property value="id" />'>Edit</a>|<a href='javascript:delMonthMessage("<s:property value=" twoid" />")' onclick="return confirm('Confirm to delete this record?')">Delete</a>
three,
Copy code code as follows:
<!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 confirm deletion dialog-lazy image gallery</title>
</head>
<body>
<p>
<script language="javascript">
function delcfm() {
if (!confirm("Confirm to delete?")) {
window.event.returnValue = false;
}
}
</script>
<a href="http://www.lanrentuku.com/" onClick="delcfm()">Delete</a></p>
<p>Code description: After clicking the deleted hyperlink, the delcfm() function will be executed. In the dialog box, if you click "OK", the function will return true value, and the page will be transferred to the link page in the <a> tag The page that was executed to delete; if you click "Cancel", the function will return a false value, and the <a> tag will not be transferred to the page that was executed to delete. </p>
<p>For more code, please visit: <a href="http://www.lanrentuku.com" target="_blank">Lazy Gallery</a></p>
</body>
</html>