473,513 Members | 3,569 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What is difference between html button?

mujeeb i
7 New Member
can you tell me the difference between the code:

<input type="submit" value="click me">

and

<button type="submit">click me</button>

//somebody tell me the difference between them with example
Jul 25 '12 #1
6 2074
Claus Mygind
571 Contributor
Why don't you look at this link http://www.w3schools.com/tags/tag_button.asp

<button> allows you to add an image to the button. I think you have have to manually assign the form submit() method to the button in order for it to actually submit the form.
Jul 25 '12 #2
Murat Bastas
25 New Member
Tips and Notes

Important: If you use the <button> element in an HTML form, different browsers may submit different values. Internet Explorer, prior version 9, will submit the text between the <button> and </button> tags, while other browsers will submit the content of the value attribute. Use the <input> element to create buttons in an HTML form.
Jul 30 '12 #3
Dormilich
8,658 Recognized Expert Moderator Expert
@Murat: usually, there is no need to process the submit button’s value. And I would always prefer <button> over <input>.
Jul 31 '12 #4
Murat Bastas
25 New Member
For example... My form is submitting with get method. And i need 2 or more send button. And i need that button's names and values to render form... If i click any button address bar is be http://example.com/formrender.php?fi...nName=sendmail or http://example.com/formrender.php?fi...me=anothertask etc... filling.

I mean is : vary according to needs... And the decision is yours.

Edit: Sorry for my bad english. I tried to explain something. And i used google translate. My english is not good. I hope you understand...
Jul 31 '12 #5
Dormilich
8,658 Recognized Expert Moderator Expert
that would lead to the question, why would you need 2 different submit buttons? but that is a question worth of its own thread.
Jul 31 '12 #6
Murat Bastas
25 New Member
Why... For example, i have a data table. And each row has got a checkbox for row's id. And i have 2 buttons. Someone delete button, someone multi edit button.

Edit : But such a form is not sending get method. Because ids an array...
Jul 31 '12 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1565
by: Matt | last post by:
The code <input type="button" name="btn" value="ok"> will produce a html button with caption ok and value ok. The problem is the width of button is dependent on the length of attribute value. And I do the following, which is not a good solution. <input type="button" name="btn" value=" ok ">
1
7505
by: Matt | last post by:
<input type="button" onClick="doSomething()"> When the user click HTML button, it will launch doSomething(). But I want the user enter ENTER key, it will have same effect. Please advise. Thanks!
3
31769
by: FantaJ | last post by:
Hi, Is it possible to make a html button invisible using javascript? I can certainly disable it: var x=document.getElementById('button2'); x.disabled=true; //x.type = 'hidden'; // read only? //x.visible = false; // doesn't exist?
2
395
by: Rocio | last post by:
I have a html button created with <input type="submit" id="btnPayNotices" value="Pay Notices" /> now I need to trap the click event at the server side. Yes, this button had to be created with plain html, not with asp.net how can i do this ?
7
2528
by: J-T | last post by:
I have a user control called "Test1" with two button on it ,one is input and the other one is a server control as follow: <input type="button" onClick="this.disabled=true;document.getElementById(btnSend).click();value="Go!"> <asp:button id="btnSend" runat="server" onClick="click" Width="90px" Text="HiddenControl"...
1
1416
by: Bishoy George | last post by:
I have an html button that reads a text box and runs a javascript. I made a Required Validator on that text box , any web button follows that validator. My html button does not follow the validator I want to force my html button to follow the validator, how to do it? Any help is very appreciated...
4
6459
by: Ryan | last post by:
Hello, I have a standard HTML button on an aspx web form that I have set to runat server. The button is named reset1 and its tag is as follows: <INPUT id="btnReset1" style="WIDTH: 60px; HEIGHT: 24px" type="reset" value="Reset" name="btnReset1" runat="server"> Using Interdev I then double click the button in design view and in the code...
2
991
by: Kevin Lawrence | last post by:
Hi I have a HTML button that can be accessed server-side too - the only problem is when the button is disabled in the client (via onclick="this.disabled=true") it doesn't reflect this when a post-back occurs. Any ideas? Thanks Kev
0
1211
by: jimryder | last post by:
I have an HTML button next to a Webcontrol Command button on my aspx page. They don't look the same! I know how to style, I just don't know what style to use to make the HTML button look like the command button. Can anyone help? FYI: the command button does a load of code behind work, where as the cancel button just runs some JS to...
4
6072
by: talk2mishal | last post by:
Hi, As i m newbie for the Perl With Html Button. The scenario is like this: I have HTML button in the perl Script. I have to get the Data of Enable checkbox Data using the button click event in perl And I have to copy/cut that Enable checkbox Data to the Other Folder in the SystemAnywhere.
0
7270
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7563
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7125
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7543
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5703
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4757
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3252
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
1612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
470
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.