[导入]div+css有focus高亮效果的文本框_html/css_WEB-ITnose
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了[导入]div+css有focus高亮效果的文本框_html/css_WEB-ITnose,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3522字,纯文字阅读大概需要6分钟。
内容图文
![[导入]div+css有focus高亮效果的文本框_html/css_WEB-ITnose](/upload/InfoBanner/zyjiaocheng/396/40b4f2848c244c4e83f91d7545894a2a.jpg)
< html xmlns = " http://www.w3.org/1999/xhtml " xml:lang = " en " lang = " en " >
< head >
< style type = " text/css " >
form ... {
margin: 0px auto;
width: 450px;
border: solid 1px #CCCCCC;
}
.bo ... {
border-bottom: solid 1px #CCCCCC;
}
label ... {
float: left;
padding: 10px 0px 4px 30px;
}
input ... {
padding: 1px;
}
input,textarea ... {
border: 1px solid #CCCCCC;
margin: 5px 0px;
}
textarea ... {
padding: 2px;
}
.bt ... {
width: 38px;
height: 20px;
font-size: 11px;
border: solid 1px #CCCCCC;
background: #FBFBFB;
text-align: center;
}
.btcenter ... {
text-align: center;
clear: left;
padding: 4px 0px 0px;
}
.sffocus ... {
background: #F0F9FB; /**//*----for IE----*/
border: 1px solid #1D95C7;
}
textarea:focus, input:focus ... {
background: #F0F9FB; /**//*----for firefox......----*/
border: 1px solid #1D95C7;
}
body ... {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #666666;
margin-top: 20px;
}
style >
< script type = " text/javascript " >
function suckerfish(type, tag, parentId) ... {
if (window.attachEvent) ...{
window.attachEvent("onload", function() ...{
var sfEls = (parentId==null)?document.getElementsByTagName(tag):document.getElementById(parentId).getElementsByTagName(tag);
type(sfEls);
});
}
}
sfHover = function(sfEls) ... {
for (var i=0; i
this.className+=" sfhover";
}
sfEls[i].onmouseout=function() ...{
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
sfFocus = function(sfEls) ... {
for (var i=0; i
this.className+=" sffocus";
}
sfEls[i].onblur=function() ...{
this.className=this.className.replace(new RegExp(" sffocus\\b"), "");
}
}
}
sfActive = function(sfEls) ... {
for (var i=0; i
this.className+=" sfactive";
}
sfEls[i].onmouseup=function() ...{
this.className=this.className.replace(new RegExp(" sfactive\\b"), "");
}
}
}
sfTarget = function(sfEls) ... {
var aEls = document.getElementsByTagName("A");
document.lastTarget = null;
for (var i=0; i
if (location.hash==("#" + sfEls[i].id)) ...{
sfEls[i].className+=" sftarget";
document.lastTarget=sfEls[i];
}
for (var j=0; j if (aEls[j].hash==("#" + sfEls[i].id)) aEls[j].targetEl = sfEls[i];
aEls[j].onclick = function() ...{
if (document.lastTarget) document.lastTarget.className = document.lastTarget.className.replace(new RegExp(" sftarget\\b"), "");
if (this.targetEl) this.targetEl.className+=" sftarget";
document.lastTarget=this.targetEl;
return true;
}
}
}
}
}
suckerfish(sfHover, " p " );
suckerfish(sfActive, " p " );
suckerfish(sfHover, " INPUT " );
suckerfish(sfActive, " TEXTAREA " );
suckerfish(sfFocus, " INPUT " );
suckerfish(sfFocus, " TEXTAREA " );
suckerfish(sfTarget, " H5 " );
suckerfish(sfHover, " pre " );
suckerfish(sfActive, " pre " );
script > head >
< body >
< form action = " # " method = " post " name = " myform " id = " myform " >
< div class = " bo " >< label for = " name " > 姓名: label >
< input type = " text " size = " 20 " name = " name " id = " name " maxlength = " 10 " /> div >
< div class = " bo " >< label for = " tel " > 电话: label >
< input type = " text " size = " 20 " name = " tel " id = " tel " maxlength = " 16 " /> div >
< div class = " bo " >< label for = " mo " > 主题: label >
< input type = " text " size = " 30 " name = " mo " id = " mo " maxlength = " 20 " /> div >
< div class = " bo " >< label for = " con " > 内容: label >
< textarea cols = " 40 " rows = " 8 " name = " con " id = " con " > textarea > div >
< div class = " btcenter " >< input type = " submit " class = " bt " value = " Send " />
< input type = " reset " class = " bt " value = " Reset " /> div > form > body > html >
文章来源: http://link-to.cn/post/2007/12/div+css-有focus高亮效果的文本框.aspx
内容总结
以上是互联网集市为您收集整理的[导入]div+css有focus高亮效果的文本框_html/css_WEB-ITnose全部内容,希望文章能够帮你解决[导入]div+css有focus高亮效果的文本框_html/css_WEB-ITnose所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。