1、示例代码
前端:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>html5表单与PHP交互</title>
</head>
<body>
<form action="http://localhost/jh.php" method="post" target="_blank"><!--需要资源定位可用get方式提交单get不安全性也是有的,并且网址长-->
<p>用户名:<input type="text" name="user" autofocus="autofocus"/></p>
<p>密 码:<input type="password" name="password"/></p>
<input type="submit"/>
</form>
</body>
</html>
后端:
<?php
echo "用户名:".$_POST['user']."<br/>密 码:".$_POST['password'];
?>
2、实例效果


相关文章:
-
2022-12-23
-
2021-08-19
-
2021-12-27
-
2022-12-23
-
2021-12-03
-
2021-07-11
-
2021-10-17
-
2022-12-23
猜你喜欢
-
2022-01-04
-
2022-12-23
-
2021-10-13
-
2022-12-23
-
2021-12-03
-
2021-11-02
-
2022-12-23
相关资源
-
下载
2023-01-05
-
下载
2021-06-07
-
下载
2023-03-26
-
下载
2022-12-22