首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

onChange跟onpropertychange事件

2012-08-21 
onChange和onpropertychange事件!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http:

onChange和onpropertychange事件

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>onproperychange和onChange方法</title><script>function changeFunction(){    document.getElementById("textfield2").readOnly=true ;}</script></head><body><br><input type="text" name="textfield" value="请输入" onpropertychange="document.getElementById('webtest').innerHTML=this.value;" /><div>您输入的值为:<span id="webtest">还未输入</span></div><input type="text" name="textfield1" value="请输入"  onChange="changeFunction()" /><input type="text" id="textfield2" name="textfield2" value="默认值" /><br /><br></body></html>

?

热点排行