<input type="text" id="unm" name="unm" readonly onclick="ShowUs()">
<input type="button" id="button2" name="button2"> onclick="unm.focus();ShowUs()" value="▼"function chgsts(){
    //在这里让text和button都变为不可用
}谢谢~!

解决方案 »

  1.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    </head><body>
    <input type="text" id="unm" name="unm" readonly onclick="ShowUs()">
    <input type="button" id="button2" name="button2" value="click me" />
    <script>
    document.getElementById('unm').disabled = 'true';
    document.getElementById('button2').disabled = 'true';
    </script>
    </body>
    </html>