亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

當某個文本框成為焦點時即清除文本框內容

 更新時間:2014年04月28日 17:18:05   作者:  
這篇文章主要介紹了當某個文本框成為焦點時如何清除文本框內容,需要的朋友可以參考下
復制代碼 代碼如下:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>成為焦點時清除文本框內容</title>
<script>
window.onload = initAll;

function initAll(){
var clearText = document.getElementsByTagName("input");
for (var i=0; i<clearText.length; i++){
clearText[i].onfocus = function ( ){
this.value = "";
}
}
}
</script>
</head>

<body>
文本框一:<input type="text" name="text" id="clearText1" value="清除文本框一的內容"/><br/>
文本框二:<input type="text" name="text" id="clearText2" value="清除文本框二的內容"/><br/>
文本框三:<input type="text" name="text" id="clearText3" value="清除文本框三的內容"/>
</body>
</html>

相關文章

最新評論