<TABLE id="Table1" border="1">
<TR>
<TD>
<input type="hidden" name="sxxh_id" id="sxxh_id" value="shyslysky">
</TD>
</TR>
</TABLE>
<script language="javascript">
 alert(document.getElementById("sxxh_id").value);
</script>

解决方案 »

  1.   

    <input type="hidden" name="sxh_id" id="sxh_id" value="<%=rs("sxh")%>">
    request("sxh_id")就是hidden的值了
      

  2.   

    我这是动态表格,你的只能取出第一行的hidden值。
    如何一点击这个TR,就把这一行中第一个TD里的两个hidden值取出来?
    <tr onclick="getvalue(this)">
    getvalue(obj){
    应该怎么写,然后就能动态的取出每一行第一个TD里的hidden值?
    }
      

  3.   

    <td height="27" align="center"  nowrap  onclick="alert(this.children[1].value);alert(this.children[2].value)">
      

  4.   

    用 数组<input type=hidden name=ex[] value="<%=rs("sxh")%>">
      

  5.   

    楼上的,能不能把getvalue(){}写完整,如何调用数组,并赋值个一个变量?
    getvalue(){
    var sxh_value=?
    var sxxh_value=?
    }
      

  6.   

    cloudchen(陈系上.net) 已经给出答案了阿。
      

  7.   

    提示children.1.value对象为空啊
    谁能写完整,马上给分!!!
      

  8.   

    没有啊,很正常,值已经读出来了,点击单元格<table border="1">
    <tr>
    <td height="27" width="400" align="center"  nowrap  onclick="alert(this.children[1].value);alert(this.children[2].value)"><input onMouseOver="this.select()" type="text" class="input5" size="4" name="oldsxh_1" id="oldsxh_12" value="0" onChange="upform()"> 
    <input type="hidden" name="sxh_id" id="sxh_id" value="123">
    <input type="hidden" name="sxxh_id" id="sxxh_id" value="456">
    </td>
    </tr>
    </table>
      

  9.   

    没有啊,很正常,值已经读出来了,点击单元格<table border="1">
    <tr>
    <td height="27" width="400" align="center"  nowrap  onclick="alert(this.children[1].value);alert(this.children[2].value)"><input onMouseOver="this.select()" type="text" class="input5" size="4" name="oldsxh_1" id="oldsxh_12" value="0" onChange="upform()"> 
    <input type="hidden" name="sxh_id" id="sxh_id" value="123">
    <input type="hidden" name="sxxh_id" id="sxxh_id" value="456">
    </td>
    </tr>
    </table>
      

  10.   

    我的源代码如下
     <tr bgcolor="<%=strBgcolor%>" onClick="changebg(this)" onDblClick="resetbg()"> 
          <td height="27" align="center"  nowrap  ><input onMouseOver="this.select()" type="text" class="input5" size="4" name="oldsxh_1" id="oldsxh_12" value="<%=rs("sxh")%>" onChange="upform()" style="background:<% = StrBgcolor%>"> 
            <input type="hidden" name="sxh_id" id="sxh_id" value="<%=rs("sxh")%>">
            <input type="hidden" name="sxxh_id" id="sxxh_id" value="<%=rs("sxxh")%>"></td>
          <td height="27" align="left"  nowrap   ><input onMouseOver="this.select()" type="text" class="input5" name="oldzbms_1" id="oldzbms_1" value="<%=rs("zbms")%>"  size="<%=len(rs("zbms"))*2%>" onChange="upform(this)" style="background:<% = StrBgcolor%>"></td>
          <td   align="left" nowrap ><input onMouseOver="this.select()" type="text" class="input5" size="6" name="oldsxxh_1" id="oldsxxh_1" value="<%=rs("sxxh")%>" onChange="upform(this)" style="background:<% = StrBgcolor%>"></td>
          <td   align="left" nowrap ><input  onMouseOver="this.select()" type="text" class="input5" name="oldsxms_1" id="oldsxms_1" value="<%=rs("sxms")%>" size="<%=len(rs("sxms"))*2%>" onChange="upform(this)" style="background:<% = StrBgcolor%>"></td>
          <td   align="left" nowrap><select>
              <%=jldw%></select> </td>
          <td width="8%"  align="center" nowrap ><input type="text" class="input5" size="8%" name="oldgydm_1" id="oldgydm_1" value="<%=rs("zbgydm")%>" onChange="upform(this)" style="background:<% = StrBgcolor%>"></td>
          <td width="31%"  align="center" nowrap > <div align="center"> 
              <select name="oldjhzb_1" id="oldjhzb_1" style="width:60">
                <option value=0 selected>非集合</option>
                <option value=1>集合</option>
              </select>
            </div></td>
        </tr>然后我要在changbg(obj){}里获得这两个hidden值
    我是要点击TR是就获得这两个hidden的值啊