javascript type attribute
Translation results:
英[taɪp] 美[taɪp]
n. Type; typeface; (printed or typed) text; in... type of
vt.& vi. typing
vt. [Medicine] Determination (blood type); classifying... by type; becoming a typical example of...; [printing] casting (type, etc.)
Third person singular: types Plural: types Present participle: typing past tense: typed past participle: typed
javascript type attributesyntax
Function:Set or return the type of button.
Syntax: buttonObject.type=value
Return: submit button is the submit button (the default value for all browsers except IE ) button button is a clickable button (IE's default value) reset button is a reset button (clear form data)
Note: Always specify the type attribute for the button. The default type in IE is "button", while in other browsers (and in the W3C specification) it is "submit".
javascript type attributeexample
<!DOCTYPE html> <html> <head> <script> function alertType() { alert(document.getElementById("myButton").type) } </script> </head> <body> <button id="myButton" type="button" onclick="alertType()">点击这里</button> </body> </html>
Run instance »
Click the "Run instance" button to view the online instance
Popular Recommendations
- Laravel Type Casting
- property target does not exist on type HTMLInputElement
- Choosing an Appropriate Integer Type in C and C
- Why you should always add type safety to your environment variables?
- Beyond Basics: Handling Numeric Inputs Like a Pro with ``
- How I Fixed My TypeScript Setup Issue: Property user does not exist on type Request.