我试图在AngularJS应用程序中以正常方式提交表单但我遇到了一个问题:似乎我必须指定action属性.
根据HTML规范(http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#form-submission-algorithm):
如果action是空字符串,则让action成为表单文档的文档地址.
但是,如果未填充action属性,AngularJS将拒绝提交表单.我找到的解决方法是使用action ="#",但这不是一个可接受的解决方案,因为我可能会使用哈希,我不希望它被重写.
有没有人遇到过这个问题?
编辑:我不想对这个表单使用angular,我只是想以"旧"的方式提交它
html forms angularjs
angularjs ×1
forms ×1
html ×1