HTML5 表單提交實例
阿新 • • 發佈:2017-09-12
技術 names java utf-8 分享 img mage text src
html
<!DOCTYPE html> <html> <head> <title>表單</title> <meta charset="utf-8"> </head> <body> <form action="http://localhost:9080/html5/html5.jsp" method="post" id="myform"></form> 姓名:<input type="text" name="names" form="myform"/> <input type="submit" value="提交" name="sub" form="myform"/> </body> </html>
html5.jsp
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Insert title here</title> </head> <body> 提交成功 </body> </html>
效果:
2017-09-12 12:56:11
HTML5 表單提交實例