<input type="text" onfocus="func111()">    <table id="table1111" name="table1" width="300" style="display:none">
        <tr >
     <td width="100">
     <input type="button" name="testBtn4" value="button" onclick=""/>
     </td>
     <td width="100">
     <input type="text" name="text4"  id="text4"/>
     </td>
     <td width="100">
     123
     </td>
     </tr>
    </table>
function func111(){
  var a=document.getElementById("table1111");
  alert(a);
  a.style.display="";
}

解决方案 »

  1.   

    <body onfocus="hideTimeTable()">
    <input type="text" value="20040218" onfocus="showTimeTable();">
    </body>
    <table id="tableMain" border="0" style="font-size:9pt;border:1px outset;background-color:threedface; cursor:default;display:none"> <tr height="17"> <!--第二个表行-->
    <td>
    <font size="2">&nbsp;小时</font> <input type="checkbox" id="hourCheck" size="4" onclick="userHour()" >
    <select id="selectHour" NAME="selectHour"  onchange="changeHour()" >
    <option selected>23</option>
    </select>
    <font size="2">分</font> <input type="checkbox" id="minuteCheck" size="4" onclick="userMinute()" >
    <select ID="SelectMinute" NAME="SelectMinute"  onchange="changeHour()" >
    <option>59</option>
    </select>
    </td>
    <td>
    <font size="2">秒</font> <input type="checkbox" id="secondCheck" size="4" onclick="userSecond()">
    <select ID="selectSecond" NAME="selectSecond"  onchange="changeSecond()">
    <option>59</option>
    </select>
    </td>
    </table>
    <SCRIPT LANGUAGE=javascript>
    <!--
    function showTimeTable()
    {
    var tb = document.getElementById("tableMain");

    tb.style.display="";
    }

    function hideTimeTable()
    {
    var tb = document.getElementById("tableMain");

    tb.style.display="none";
    }
    //-->
    </SCRIPT>