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>密&nbsp;码:<input type="password" name="password"/></p>
<input type="submit"/>
</form>
</body>
</html>

后端:

<?php
echo "用户名:".$_POST['user']."<br/>密&nbsp;码:".$_POST['password'];
?>

2、实例效果

更多相关文章

  1. PHP表单在Internet Explorer中不起作用
  2. 如何使用jQuery在我的网站演示中自动填写表单,好像真人正在打字?
  3. 禁用div中的所有表单元素
  4. 在HTML / PHP联系表单上出现404/405错误(链接问题?)
  5. JSF和HTML表单的Unicode问题?
  6. 如何使用struts2访问表单数组字段
  7. 用于检查用户名可用性的Javascript帖子无效
  8. 提交一个表单(后台生成id),点击保存并一步后切换到下一个tab中,此t
  9. 使用mysql验证在php中登录表单

随机推荐

  1. Android热点回顾第一期
  2. android远程控制(一)----发现驱动文件里代
  3. Android简介与开发环境搭建
  4. android 横竖屏转换
  5. 应用兼容性Android Studio IDEA:基于IDEA
  6. Android UI开发第二十八篇——Fragment中
  7. 【Android UI】Android Layout XML属性
  8. Android(安卓)ListView 和 BaseAdapter
  9. Android中的Handler机制
  10. Android开机LOGO