<style>
<!--
.sffocus {
 BORDER-RIGHT: #1d95c7 1px solid; BORDER-TOP: #1d95c7 1px solid; BACKGROUND: #eef2ff; BORDER-LEFT: #1d95c7 1px solid; BORDER-BOTTOM: #1d95c7 1px solid
}
 TEXTAREA:unknown {
 BORDER-RIGHT: #1d95c7 1px solid; BORDER-TOP: #1d95c7 1px solid; BACKGROUND: #eef2ff; BORDER-LEFT: #1d95c7 1px solid; BORDER-BOTTOM: #1d95c7 1px solid
}
INPUT:unknown {
 BORDER-RIGHT: #1d95c7 1px solid; BORDER-TOP: #1d95c7 1px solid; BACKGROUND: #eef2ff; BORDER-LEFT: #1d95c7 1px solid; BORDER-BOTTOM: #1d95c7 1px solid
}
INPUT {
 BORDER-RIGHT: #999 1px solid; BORDER-TOP: #999 1px solid; MARGIN: 0px; BORDER-LEFT: #999 1px solid; BORDER-BOTTOM: #999 1px solid
}
TEXTAREA {
 BORDER-RIGHT: #999 1px solid; BORDER-TOP: #999 1px solid; MARGIN: 0px; BORDER-LEFT: #999 1px solid; BORDER-BOTTOM: #999 1px solid
}
 
 -->
</style>

<SCRIPT>
<!--

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);
   });
  }
 }
 
 sfFocus = function(sfEls) {
  for (var i=0; i<sfEls.length; i++)
   {
   sfEls[i].onfocus=function()
     {
    this.className+=" sffocus";
    }
   sfEls[i].onblur=function()
     {
    this.className=this.className.replace(new RegExp(" sffocus\\b"), "");
    }
  }
}
suckerfish(sfFocus, "INPUT");
suckerfish(sfFocus, "TEXTAREA");
//-->
</SCRIPT>

相关文章:

  • 2021-11-27
  • 2022-12-23
  • 2021-07-06
  • 2021-05-25
  • 2022-02-21
  • 2021-10-30
  • 2022-02-06
  • 2021-10-22
猜你喜欢
  • 2022-12-23
  • 2021-06-17
  • 2021-09-17
  • 2021-08-03
相关资源
相似解决方案