嗨,大家好,我有一個以下代碼,我試圖重定向到另一個,我使用javascript html來實現這一點,我是新來的HTML,JavaScript和PHP。它顯示test.php
,但當我點擊按鈕,它不會重定向到logout_success.php
。在html和javascript中從一個頁面到另一個頁面的重定向錯誤?
<!DOCTYPE HTML>
<html>
<head>
<title>Sign-In</title> <link rel="stylesheet" type="text/css" href="style-sign.css">
</head>
<body id="body-color">
<div id="Sign-In">
<fieldset style="width:30%">
<legend>LOG-IN HERE</legend>
<form method="POST" action="connectivity.php">
User
<br>
<input type="text" name="user" size="40">
<br>
Password
<br>
<input type="password" name="pass" size="40"><br>
<input id="button" type="submit" name="submit" value="Log-In" onclick="document.location.href='http://localhost:8080/PortalWork/logout_success.php'">
</form>
</fieldset>
</div>
</body>
</html>
<形式方法= 「POST」 行動= 「connectivity.php」>使用logout_success.php而不是connectivity.php – Jageen 2014-09-04 10:32:37