<head>
<style>
.focus{background-color:#ffffff}
.blur{background-color:#3366cc}
</style></head><body>
<input onfocus="style.backgroundColor=''" onblur="style.backgroundColor='#3366cc'">
<input onfocus="className='focus'" onblur="className='blur'">
</body>

解决方案 »

  1.   

    <Input onfocus="style.color='Red'" onblur="style.color='Blue'">
      

  2.   

    <Input onfocus="style.backgroundColor='Red'" onblur="style.backgroundColor='Blue'">
      

  3.   

    <HTML>
    <HEAD>
    <TITLE>Script Encoder Sample Page</TITLE>
    <style>
    .input1{behavior:url("bg.htc")}
    </style>
    </HEAD>
    <BODY>
    <input class='input1'>
    </BODY>
    </HTML>
    bg.htc//同一目录
    <PUBLIC:COMPONENT>
    <PUBLIC:ATTACH EVENT="onfocus" ONEVENT="fos()"/>
    <PUBLIC:ATTACH EVENT="onblur" ONEVENT="blu()"/>
    <SCRIPT>
    function fos(){
    style.backgroundColor='#ffffff'
    }
    function blu(){
    style.backgroundColor='#3366cc'
    }
    </SCRIPT>
    </PUBLIC:COMPONENT>
      

  4.   

    这种方法时怎么用 ClassName ?
      

  5.   

    fason(阿信) 用HTC时
    如果用ClassName怎么写啊?
      

  6.   

    className怎么写?就是
    <style>
    .input1{behavior:url("bg.htc")}
    </style>
    后,class="input1"
    这样已经有你要的效果了