<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>JS-OO 单行文本框</TITLE>
<style>
<!--
.inputBGFront{
background-color:#f1f1f1;
border:1px solid #FF6666;
}
.inputBGBack{
background-color:#fffff0;
border:1px solid #999999;
}
-->
</style>
<SCRIPT LANGUAGE="JavaScript">
<!--
var InputOO = function(obj){
obj.className = "inputBGFront";
obj.onmouseover = function(){
obj.className = "inputBGBack";
}
obj.onmouseout=function(){
obj.className = "inputBGFront";
};
}
window.onload = function(){
var inputList = document.getElementsByTagName("input");
for(var i = 0 ; i<inputList.length ; i++){
var inputObj = inputList[i];
if(inputObj.type=='text'){
InputOO(inputObj);
}
}
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<INPUT TYPE="text" NAME="" id="input1" value="aaaa"/><br/>
<INPUT TYPE="text" NAME="" id="input2" value="bbbb"/><br/>
<INPUT TYPE="text" NAME="" id="input3" value="cccc"/><br/>
<INPUT TYPE="text" NAME="" id="input4" value="dddd"/><br/>
<INPUT TYPE="text" NAME="" id="input5" value="eeee"/><br/>
</BODY>
</HTML>
jsoo编程实例之单行文本框
最新推荐文章于 2022-08-31 10:44:37 发布