1The <input type="button"> defines a clickable button (mostly used with a JavaScript to activate a script).
2
3Syntax
4<input type="button">
5
6A push button that activates a JavaScript when it is clicked:
7<input type="button" value="Click me" onclick="msg()">
8
9And there is also different kind of buttons are there
10<input type="submit">
11<input type="reset">
12These buttons are mostly used in form processing concept.
13where submit button is use to submit the form data and reset button is for to blank out the form fields.
14
1//HTML Textbox w/Getting Javascript Input:
2<script>
3 function getTextBox(){
4 var k = document.getElemntById('myTextBox').value
5 alert(k)
6 }
7</script>
8<input type="text" id="myTextBox">
9<button onclick="getTextBox()">Get Text Input</button>
1<form action="/button-type">
2<button type="button" onclick="alert('This button does nothing.')">Click me for no reason!</button><br><br>
3<label for="name">Name</label><br>
4<input name="name"><br><br>
5<button type="reset">Reset the form!</button><br><br>
6<button disabled>Submit (disabled)</button>
7</form>