<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
<Title> onpropertychange, oninput </title>
<Style type = "text/CSS">
* {Font-size: 14px; font-family: 'comic sans Ms', verdana}
Body {margin-left: 20px}
</Style>
</Head>
<Body>
<P> onchange event: </P>
<Input type = "text" id = "txt1"/>
<P> onpropertychange/oninput event: </P>
<Input type = "text" id = "txt2"/>
<P> result: </P>
<Input type = "text" id = "TXT"/>
<SCRIPT type = "text/JavaScript">
VaR $ = function (o ){
Return document. getelementbyid (o)
};
$ ('Txt1'). onchange = function (){
$ ('Txt '). value = This. value;
}
$ ('Txt2'). onpropertychange = function (){
$ ('Txt '). value = This. value;
}
If (window. addeventlistener ){
$ ('Txt2'). addeventlistener ('input', function () {$ ('txt '). value = This. Value}, false );
}
</SCRIPT>
</Body>
</Html>