button和submit区别(防止表单自动提交,以及submit和button提交表单的区别)

本文目录
防止表单自动提交,以及submit和button提交表单的区别
先说防止表单自动提交:
1、可以为form标签加入 onsubmit 事件,事件调用的方法返回true时,提交,false时不提交。
2、较为全面的方式是为form做一个表单提交前验证,就是在表单提交按钮上添加一个方法:检查所有表单内容是否符合标准,符合就发送ajax请求将数据发到后端保存,不符合就提示用户更正。
submit和button的提交表达的区别,submit不用特殊绑定事件,直接回提交当前form中的数据到form指定的地址,button需要单独绑定事件才能达到相同效果。可以理解为submit与form直接相关,button只是一个普通的按钮,用户不为他制定任务他就是一个没用的按钮。
button和submit,真是不懂啊请达人指点
button按钮
submit提交
词性不一样的
button
but.ton
AHD:
D.J.
K.K.
n.(名词)
A generally disk-shaped fastener used to join two parts of a garment by fitting through a buttonhole or loop.
钮扣:通常为圆片状的固着物,用于穿过扣眼或扣环将衣服的两个部分连起来
Such an object used for decoration.
装饰扣:用于装饰的钮扣
Any of various objects resembling a button, especially:
钮扣似的东西:各种类似钮扣的东西,特别指:
A push-button switch.
按钮开关
The blunt tip of a fencing foil.
击剑的钝剑头
A fused metal or glass globule.
金属球,玻璃球:熔合的金属或玻璃小球
Any of various knoblike structures of a plant or animal, especially:
扣形物:植物或动物的各种球状结构,尤指:
An immature, unexpanded mushroom.
末成熟的,未张开的蘑菇
The tip of a rattlesnake’s rattle.
响尾蛇发声器官的末端
A usually round flat badge that bears a design or printed information and is typically pinned to a garment:
圆形小徽章:通常为一种圆形扁平的徽章,上面有花纹或印制的信息,象征性地别在衣服上:
a campaign button.
军功章
Informal The end of the chin, regarded as the point of impact for a punch.
【非正式用语】 颏尖:下巴的下端,被当作拳击的攻击点
v.(动词)
but.toned, but.ton.ing, but.tons
v.tr.(及物动词)
To fasten with buttons:
用钮扣扣紧:
buttoned his shirt; buttoned up her raincoat.
扣上衬衫钮扣;把雨衣扣好
To decorate or furnish with buttons.
用钮扣装饰
Informal To close (the lips or mouth):
【非正式用语】 闭嘴:闭上(双唇或嘴巴):
Button your lip.
闭上嘴
v.intr.(不及物动词)
To be or be capable of being fastened with buttons:
扣上扣子:能用扣子扣住:
The blouse buttons up the back.
这件衣服从背后扣钮扣
on the button
Exactly; precisely.
准确;确切
submit
sub.mit
AHD:
D.J.
K.K.
v.(动词)
sub.mit.ted, sub.mit.ting, sub.mits
v.tr.(及物动词)
To yield or surrender (oneself) to the will or authority of another:
使屈服:使(自己)服从于别人的意志或权威:
“Nothing but contempt is due to those people who ask us to submit to unmerited oppression”(Christabel Pankhurst)
“对于那些要求我们服从我们不能受之压迫的人,我们有的只是轻蔑”(克赖斯塔伯·潘克赫斯特)
To subject to a condition or process.
使经受
To commit (something) to the consideration or judgment of another.See Synonyms at propose
使听从,使受…摆布:将(某事)交于某人来考虑或判断参见 propose
To offer as a proposition or contention:
将…作为意见提出:
I submit that the terms are entirely unreasonable.
我认为这些名称是完全不合理的
v.intr.(不及物动词)
To give in to the authority, power, or desires of another.See Synonyms at yield
服从:服从别人的权威、权力或欲望参见 yield
To allow oneself to be subjected to something.
使某人屈服于某物

更多文章:
jquery sortable(jquery sortable怎么支持多个一起拖拽)
2026年8月28日 14:00
数组大小计算公式(关于EXCEL里数组比较大小 然后分别赋值的公式)
2025年6月18日 08:30
addeventlistener()(window.addeventlistener怎么用)
2026年5月21日 20:00
display在java中什么意思(javascript中 visibility和display的区别)
2025年10月10日 06:30
web of science怎么看全文(如何在web of science 上检索一个学者的全部文章)
2025年12月22日 01:15
soil的翻译(英语单选提问:soil 与earth 的区别)
2026年1月16日 17:15
8086汇编语言中的DIV指令溢出问题(回答的好会加分)?汇编里面,进位一定溢出吗
2026年2月5日 09:15
readfile共享读写(MFC如何读取文件到内存,再写到磁盘)
2026年6月6日 02:45
datetime库的time引用(python中如何把datetime.datetime转换成datetime.time)
2025年10月5日 10:45
long int类型占几个字节(【C语言】关于int、long所占字节数问题的讨论万分感谢!)
2025年11月24日 21:00







![grep使用正则表达式(正则表达式:grep “^[[:space :]]*$” 表示什么)](/static/images/nopic/9.jpg)




