登录 | 注册 | FAQ
Anonymous

Button vs submit

+ 发表回复

6 篇帖子 分页: 1 / 1


Button vs submit

jackkds789 » 周六 10月 03, 2015 1:57 pm

While designing forms when to use input type=button and when to use input type=Submit?

Please reply :(
头像

jackkds789

  • 帖子: 6
  • 注册: 周日 9月 27, 2015 6:26 pm

Re: Button vs submit

nanoverso » 周六 10月 03, 2015 4:39 pm

Their functionality are pretty the same, but the button tag is more flexible. Take a look at this article at CSS Tricks: https://css-tricks.com/use-button-element/ .
头像

nanoverso

  • 帖子: 253
  • 注册: 周六 5月 10, 2014 12:08 am
  • 地址: Brazil
--
Free VST Plugins Download.

Re: Button vs submit

jackkds789 » 周日 10月 04, 2015 6:43 am

Thank you
头像

jackkds789

  • 帖子: 6
  • 注册: 周日 9月 27, 2015 6:26 pm

Re: Button vs submit

emily008 » 周三 10月 07, 2015 7:32 am

type="submit" is a submit button and it will submit the form on the other hand type="button" is just a clickable button it will not submit the form and it is most used with JavaScript.
头像

emily008

  • 帖子: 8
  • 注册: 周三 10月 07, 2015 6:29 am
  • 地址: London
--
For more visit HTML Tutorial

Re: Button vs submit

jackkds789 » 周四 10月 08, 2015 1:40 am

Yeah..Thanks :)
头像

jackkds789

  • 帖子: 6
  • 注册: 周日 9月 27, 2015 6:26 pm

Re: Button vs submit

surajk09 » 周日 10月 11, 2015 4:56 pm

1. Button:
<Input type="button">
This is only a simple button. This will allow to call java script function and this can't do anything itself.

2. Submit:
<Input Type="submit">
This submit button will submit the form on clicking but if when this submit button is inside the form element.

http://www.htmlrun.com/2015/10/difference-between-button-and-submit.html#more
头像

surajk09

  • 帖子: 9
  • 注册: 周日 2月 01, 2015 6:04 pm
--
Suraj
For tech http://www.htmlrun.com


+ 发表回复

分页: 1 / 1