javascript onchange attribute
Translation results:
on
UK[ɒn] 美[ɑ:n]
prep. (indicates direction) to; (indicates object) to; ( Indicates position) on...; (indicates time) at the time of...
adv. (put, wear, connect) on; forward, (continue) down
adj. active situation, status; being used; happening; planned
change
英[tʃeɪndʒ] US[tʃendʒ]
vt. Change, alter; exchange, replace; exchange; change clothes (sheets)
vi. Change, transform; exchange, exchange; change clothes, change clothes
n. Change, change; exchange, alternation; change, change; substitute
Third person singular: changes Plural: changes Present participle: changing Past tense: changed Past participle: changed
javascript onchange attributesyntax
Function: Occurs when the content of the domain changes.
Syntax: onchange="SomeJavaScriptCode"
Parameters:
Parameters | Description |
SomeJavaScriptCode | Required. Specifies the JavaScript to be executed when this event occurs. |
javascript onchange attributeexample
<html> <head> <script type="text/javascript"> function upperCase(x) { var y=document.getElementById(x).value document.getElementById(x).value=y.toUpperCase() } </script> </head> <body> Enter your name: <input type="text" id="fname" onchange="upperCase(this.id)"> </body> </html>
Run instance »
Click the "Run instance" button to view the online instance