html表单提交 重置内容
When all is said and done, the user needs to indicate that they are finished entering information with the form and want to submit it. This is done with a submit
button, which is usually the last (or second-to-last) tag before the closing </form>
tag:
说完所有内容后,用户需要指示他们已经完成了使用表单输入信息并希望提交信息。 这是通过submit
按钮完成的,通常是</form>
结束标记之前的最后一个(或倒数第二个)标记:
<input type="submit" value="Go!">
While it is not necessary to place an id
or name
on the submit
button, doing so can be useful for the purposes of validating the form information, which I cover in the PHP section.
虽然没有必要在submit
按钮上放置id
或name
,但是这样做对于验证表单信息很有用,这将在PHP部分中介绍。
重启 (Reset)
A reset
button sets the form back to its default settings. Be very careful where you place a reset
button: too close to the submit
button and some users will inevitably accidentally click on it rather than the submit
button by mistake, and there is no way to get back their information once they have done so. Physically separate the submit
and reset
buttons with a space at the very least, or skip the reset button entirely.
reset
按钮将表单重新设置为其默认设置。 请特别注意放置reset
按钮的位置:过于靠近“ submit
按钮,某些用户不可避免地会无意间点击它,而不是错误地单击“ submit
按钮,一旦这样做,就无法取回其信息。 物理上将submit
按钮和reset
按钮至少隔开一个空格,或者完全跳过重置按钮。
<input type="reset" value="Reset form">
html表单提交 重置内容