标签: html coding-style standards w3c-validation
通常,提交按钮在没有name属性的情况下正常工作。但是,有时候需要为同一个表单提供两个提交按钮,因此使用name属性来识别在服务器端单击了哪个按钮。
name
澄清我在谈论:<input type="submit" name="foo">
<input type="submit" name="foo">
答案 0 :(得分:3)
是的,完全可以接受。
规范has explicit rules for how to determine which submit button was successful,如果你不能给元素命名,这将是无用的。