标签:java cti javascript io div type
<script type="text/javascript">
function cls() {
//捕获触发事件的对象,并设置为以下语句的默认对象
with (event.srcElement)
//如果当前值为默认值,则清空
if (value == defaultValue) value = ""
}
function res() {
//捕获触发事件的对象,并设置为以下语句的默认对象
with (event.srcElement)
//如果当前值为空,则重置为默认值
if (value == "") value = defaultValue
}
</script>
<input value="填写您的昵称" onfocus="cls()" onblur="res()"/>
<input value="填写您的生日(1900-01-01)" onfocus="cls()" onblur="res()"/>
bobo javascript中onblur和onfocus,布布扣,bubuko.com
bobo javascript中onblur和onfocus
标签:java cti javascript io div type
原文地址:http://www.cnblogs.com/nice41/p/3831859.html