<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis" />
<title>test</title>
<style type="text/css">
<!--
body {
background-image: url(http://www.csdn.net/Images/logo_csdn.gif);
}
input {
filter: Alpha(Opacity=70, FinishO,pacity=0, Style=0, StartX=0, StartY=0, FinishX=0, FinishY=0);
border:1px #000000 solid;
color:#000000;
}
-->
</style>
</head><body>
<p>
<input type="text" name="textfield" />
</p>
<p>
<input type="text" name="textfield2" />
</p>
<p>
<input type="text" name="textfield3" />
</p>
<p>
<input type="text" name="textfield4" />
</p>
<p>
<input type="text" name="textfield5" />
</p>
<p>
<input type="text" name="textfield6" />
</p>
<p>
<input type="text" name="textfield7" />
</p>
<p>
<input type="text" name="textfield8" />
</p>
</body>
</html>
将就一下吧!!好像不太容易实现,看后面有没有高手解决
<head>
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis" />
<title>test</title>
<style type="text/css">
<!--
body {
background-image: url(http://www.csdn.net/Images/logo_csdn.gif);
}
input {
filter: Alpha(Opacity=70, FinishO,pacity=0, Style=0, StartX=0, StartY=0, FinishX=0, FinishY=0);
border:1px #000000 solid;
color:#000000;
}
-->
</style>
</head><body>
<p>
<input type="text" name="textfield" />
</p>
<p>
<input type="text" name="textfield2" />
</p>
<p>
<input type="text" name="textfield3" />
</p>
<p>
<input type="text" name="textfield4" />
</p>
<p>
<input type="text" name="textfield5" />
</p>
<p>
<input type="text" name="textfield6" />
</p>
<p>
<input type="text" name="textfield7" />
</p>
<p>
<input type="text" name="textfield8" />
</p>
</body>
</html>
将就一下吧!!好像不太容易实现,看后面有没有高手解决
function test(){
var objs = document.getElementsByTagName("input");
for(var i = 0 ; i < objs.length ;i++){
if(objs[i].type && objs[i].type =="text"){
objs[i].onfocus = function (){
this.style.filter = "";
}
objs[i].onblur = function (){
this.style.filter = "Alpha(Opacity=70, FinishO,pacity=0, Style=0, StartX=0, StartY=0, FinishX=0, FinishY=0)";
}
}
}
}
</script>
</head><body onload="test()">
input.default{}
input.userset{
color:white;
border:0px;
background-image:url('http://www.csdn.net/Skins/Default/Images/CSTTitle.gif');
}
</style>
<input type="text" onblur="this.className='userset'" onfocus="this.className='default'" value="这里就是内容,点上来看看" class="userset" size="35" maxlength="20">