onpropertypchange
更新時(shí)間:2006年07月01日 00:00:00 作者:
<html>
<head>
<script language="javascript">
function changeBox(status)
{
textbox.style.display = status ? "" : "none"
}
</script>
<script language="javascript" for="test" event="onpropertychange">
var propName = event.propertyName
var propValue = this[propName]
switch(propName)
{
case "checked":
changeBox(propValue)
break;
}
</script>
</head>
<body>
<input type="radio" id="test" name="radio" checked="true" />
<input type="radio" name="radio" />
<input id="textbox" />
</body>
</html>
<div style="position: absolute; top: 10; right: 10; width: 148; height: 18;cursor:hand">
<input type="button" name="Button" value="查看源代碼" onClick= 'window.location = "view-source:" + window.location.href'></div>
<head>
<script language="javascript">
function changeBox(status)
{
textbox.style.display = status ? "" : "none"
}
</script>
<script language="javascript" for="test" event="onpropertychange">
var propName = event.propertyName
var propValue = this[propName]
switch(propName)
{
case "checked":
changeBox(propValue)
break;
}
</script>
</head>
<body>
<input type="radio" id="test" name="radio" checked="true" />
<input type="radio" name="radio" />
<input id="textbox" />
</body>
</html>
<div style="position: absolute; top: 10; right: 10; width: 148; height: 18;cursor:hand">
<input type="button" name="Button" value="查看源代碼" onClick= 'window.location = "view-source:" + window.location.href'></div>
相關(guān)文章
javascript中input中readonly和disabled區(qū)別介紹
javascript中input中readonly和disabled區(qū)別,在開(kāi)發(fā)中可能會(huì)常有用到,利用js動(dòng)態(tài)改變input的屬性2012-10-10
FileUpload 控件 禁止手動(dòng)輸入或粘貼的實(shí)現(xiàn)代碼
FileUpload 控件 禁止手動(dòng)輸入或粘貼的實(shí)現(xiàn)代碼,經(jīng)常用于比較安全無(wú)誤的輸入,例如身份證號(hào)碼,密碼,銀行賬戶(hù)等。2010-04-04
js動(dòng)態(tài)在form上插入enctype=multipart/form-data的問(wèn)題
在做文件上傳的時(shí)候碰到了一個(gè)比較奇怪的問(wèn)題,IE6,7,8上傳文件總是失敗,服務(wù)端接收不到文件的問(wèn)題2012-05-05
javascript select options 排序(保持option 對(duì)象完整性)
select options 排序(保持option 對(duì)象完整性)2010-03-03
二級(jí)連動(dòng)的另一個(gè)不錯(cuò)的實(shí)現(xiàn)方法
二級(jí)連動(dòng)的另一個(gè)不錯(cuò)的實(shí)現(xiàn)方法...2007-01-01

