暂且不管你的代码中其他问题,单单
document.form1.linkman.bgcolor="red"    
就是一句语法上正确,实际却无用的语句,既然是立体的文本框,那么其背景色肯定无法透视过来
因此,如果你想让你的文本框有背景色还是先将其改为平面的文本框吧;
提供一例:
<style>
.inputtype
{    
    BORDER-RIGHT: navy 1px solid;
    BORDER-TOP: navy 1px solid;
    BORDER-LEFT: navy 1px solid;
    BORDER-BOTTOM: navy 1px solid;
    LINE-HEIGHT: normal;
    BACKGROUND-COLOR: red;
    TEXT-ALIGN: center
}

解决方案 »

  1.   

    那样做是不对的,下面举个例子,希望从中借鉴!代码与你的不一样,但你能看明白!
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <script language="JavaScript">
    <!--
    function check(){
    document.all.a1.style.width="200"
    document.all.a1.style.backgroundColor="#ff0000"
    }
    // -->
    </script>
    </head><body bgcolor="#FFFFFF" text="#000000">
    <p><a href="#" onmouseover="ch2()">鼠标移动到这里看效果!!</a></p>
    <form name="form1" method="post" action="">
    <input type="radio" name="radiobutton" value="radiobutton">
    <input type="radio" name="radiobutton" value="radiobutton" onfocus="check()">
    <input type="text" id="a1" value="" style="position:absolute; width:200px; height:115px; z-index:1; background-color: #0099FF;">
    </form>
    </body>
    </html>
      

  2.   

    抱歉;上面代码多了一句!正确的如下:
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <script language="JavaScript">
    <!--
    function check(){
    document.all.a1.style.width="200"
    document.all.a1.style.backgroundColor="#ff0000"
    }
    // -->
    </script>
    </head><body bgcolor="#FFFFFF" text="#000000">
    <form name="form1" method="post" action="">
    <input type="radio" name="radiobutton" value="radiobutton">
    <input type="radio" name="radiobutton" value="radiobutton" onfocus="check()">
    <input type="text" id="a1" value="" style="position:absolute; width:200px; height:115px; z-index:1; background-color: #0099FF;">
    </form>
    </body>
    </html>
      

  3.   

    顺便说明一下:上面用的是CSS2的属性,确保你的浏览器支持CSS2,IE5+和NN6都用这种属性!