Form submit button will not submit when name of button is "submit"

I am having trouble getting a form to submit when the name attribute of the submit button is precisely "submit". Here is the code: `` Note that we are not using a standard input type of "submit", but rather an input type of "button" with JavaScript being used to submit the form after a validation script (checkForm) has returned true. The odd thing is that this will not work if and only if the name attribute is "submit". The problem is case-sensitive, so the following (and any other naming, including no name attribute) will work: `` I have been looking over the W3C specs for some mention of a reserved name, but I could not find anything. I suspect I am overlooking something really obvious here, so I'm hoping some of y'all out there can see something I can't. Thanks for any help.

以上就是Form submit button will not submit when name of button is "submit"的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏