今天写网站,需要用到一个页面的确定框,下面是代码:
<html>
<head>
</head>
<body>
<a href = "test2.html" onclick = "javascript:return a();">as</a>
</body>
<script language="JavaScript">
function a()
{
if(window.confirm("确定?") == true){
return true
}
else{
return false;
}
}
</script>
</html>