form 的submit提交没有反应
2016-04-18 10:18
435 查看
搞了一天,submit提交就是没有反应,原来是标签用错了。
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<h:form id="form1" action="goto.html" method="post">
input text :<input type ="text" name ="info" id="text"/>
<input type="submit" name="submit" value ="show" />
</h:form>
</body>
</html>
做如下修改后,即可正常提交 submit。原因是 <h:form> 是属于jsf框架的标签,通过<h:commonbutton>来提交表单,<form>是属于html的标签,通过 type=submit 来提交表单。
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<form id="form1" action="goto.html" method="post">
input text :<input type ="text" name ="info" id="text"/>
<input type="submit" name="submit" value ="show" />
</form>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<h:form id="form1" action="goto.html" method="post">
input text :<input type ="text" name ="info" id="text"/>
<input type="submit" name="submit" value ="show" />
</h:form>
</body>
</html>
做如下修改后,即可正常提交 submit。原因是 <h:form> 是属于jsf框架的标签,通过<h:commonbutton>来提交表单,<form>是属于html的标签,通过 type=submit 来提交表单。
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<form id="form1" action="goto.html" method="post">
input text :<input type ="text" name ="info" id="text"/>
<input type="submit" name="submit" value ="show" />
</form>
</body>
</html>
相关文章推荐
- iOS上传图片
- 深入剖析Auto Layout,分析iOS各版本新增特性
- Android应用程序(APK)的编译打包过程
- mysql乱码解决
- H3C IPv6
- Android ViewDragHelper(1)
- Android ZIP文件提取classes.dex文件签名校验绕过漏洞
- JDBC
- 连接数据库
- 解决Android Fragment 无法相应 onActivityResult 的问题.
- 磁盘吞吐量优化
- linux编译!
- eclipse svn时忽略target .project .classpath等目录文件
- 通过select较高效的捕获和处理鼠标键盘事件
- vi编辑器
- javax.naming.NameNotFoundException
- java comet
- Android开发环境搭建【详细教程】
- jQuery animate和CSS3相结合实现缓动追逐效果附源码下载
- 数据库表的垂直拆分和水平拆分