在自己的页面上提交html表单 [英] submit html form on self page
本文介绍了在自己的页面上提交html表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望html表单在自我页面上提交,如何使用 action
atribute
< form action =>
或
< form action =#>
或
< form action =here write addres this page>
或者简单地不使用 action
atribute?
有什么更好的办法?
2013年,所有html5的东西,你可以忽略'action'属性来自我提交一个表单 < form>
实际上,当前HTML5草案的表单提交子部分不允许action =(空属性)。这是违反规范。
From 这个其他的Stackoverflow答案
I want html form submit on self page, how to use action
atribute
<form action="">
or
<form action="#">
or
<form action="here write addres this page">
or just simple not use action
atribute ?
what is much better way ?
解决方案
In 2013, with all html5 stuff, you can just ommit the 'action' attribute to self-submit a form
<form>
Actually, the Form Submission subsection of the current HTML5 draft does not allow action="" (empty attribute). It is against the spec.
From this other Stackoverflow answer
这篇关于在自己的页面上提交html表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文