+ -
当前位置:首页 → 问答吧 → 怎么让<select></select>在页面中变为灰色不可以使用,急

怎么让<select></select>在页面中变为灰色不可以使用,急

时间:2011-03-10

来源:互联网

怎么让<select></select>在页面中变为灰色不可以使用,急
怎么让<select></select>在页面中变为灰色不可以使用,急

作者: huanglh541   发布时间: 2011-03-10

var a=document.getelementbyid("id");
a.disabled=true;
好象大概这样吧.

作者: flyerwing   发布时间: 2011-03-10

HTML code
    <body>
        <select name="kk">
            <option value="" selected>1</option>
            <option value="">2</option>
        </select>
        <input type="button" value="Click" onclick="document.getElementsByName('kk')[0].disabled=true"/>
    </body>

作者: hongmei85   发布时间: 2011-03-10