Copy code code as follows:
<! Doctype html>
<html>
<head>
<meta charset = "UTF-8">
<meta name = "author" content = "// www.vevb.com/"/>
<Title> Wulin.com </Title>
<script type = "text/javascript">
Window.Onload = function () ()
{{
var olink = document.GetelementByid ("link");
Olink.onClight = FTECTION () ()
{{
if (confirm ("whether deleted?") {Alert ("Files were deleted");}
Return false;
}
}
</script>
</head>
<body>
<a href = "#" id = "link"> Whether to delete </a>
</body>
</html>
The above code implements our requirements. Links will only be used as ordinary buttons. This is mainly to use the Return False statement in the link of the link.