加一个函数,把灰化输入框的DISABLED属性取反。

解决方案 »

  1.   

    这样就可以实现了,代码如下:
    <script language="JavaScript">
    <!--
    function lockfile()
    {
    document.all('test').readOnly=true;
    alert("now lock up the text");
    }function openfile()
    {
    document.all('test').readOnly=false;
    alert("now open the text");
    }
    -->
    </script><form action="test.jsp" method="post" name="form1">
    <input name="test" type="text" class="text" id="test" size="50">
    <input name="file_yes_no" type="radio" value="yes" onclick="openfile()">yes
    <input name="file_yes_no" type="radio" value="no" onclick="lockfile()"> no
    <input type="submit" name="Submit" value="ok">
    </form>OK.结贴吧!!嘿嘿!!