每次有人单击注销按钮时,都会出现一个确认对话框,但是当我单击时没有任何响应。我还尝试通过在加载 pade 时提供淡入淡出效果来制作 jquery 效果,但也没有任何响应。我保存页面 ini .php 扩展名。
<html>
<head>
<title>Home</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
</script>
<script type="text/javascript">
$(document).ready(function(){
$("*").fadeIn(4000);
});
function confirm() {
var answer = confirm("Are you sure you want to register?")
if (answer){
window.location = "unregister.php";
}
else{
alert("Thanks for sticking around!")
}
}
</script>
</head>
<body>
<p>
<form id="form2" name="form2" method="post">
<a href="logout.php"><button>Logout</button></a>
<a href="form.php"><button>Add New record</button></a>
<a href="register.php"><button>Edit Profile</button></a>
<input type="button" onClick="confirm()" value="Unregister">
</form>
</p>
....