【发布时间】:2021-04-18 03:16:14
【问题描述】:
如何去除form标签中的action属性。我想找到一种方法将表单提交到现有的“process_login.php.php”,而无需操作属性。请不要使用任何 JavaScript。
<!DOCTYPE html>
<html>
<head>
<title>Login Form</title>
</head>
<body>
<h1>Login Form</h1>
<hr>
<form action="http://corneyx.com/process_login.php" method="post">
<table border="1" cellpadding="10">
<tr>
<td>Username:</td>
<td><input type="text" name="username" required></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="password" required></td>
</tr>
</table>
<hr>
<!-- put your buttons here -->
<input type="hidden" name="matricnum" value="???????">
<input type="submit" name="login_form" value="Login">
<input type="reset">
</form>
</body>
</html>
【问题讨论】:
-
你不能。为什么不想用javascript,为什么要去掉action标签?