给子table 加个id 比如叫:t1然后 : t1.style.display = "" //显示t1.style.display = "none" //不显示
解决方案 »
- 计算器加减乘除没用了,为什么?
- 两个整数相加的问题
- 谁能告诉我Javascript里的alert( 507000.2138+17790.474 );等于多少
- 关于createElement,试了很长时间还是不行,请高手指点
- 关于给input的属性绑定json数据的奇怪现象
- EXTJS 怎么根据combobox选中后加载tree
- 关于iframe内控件的事件问题,请教高手。
- 一个非常简单的问题,简单到聪明的人经常会弄错……………
- 小白提问:关于JSP文件放置的问题
- 在jquery 1.11.1版本中,如何实现jquery 1.9以下版本里面的toggle功能?
- window.open跳转的问题
- td对应问题
给table加id,
然后document.all.tableid.style.display="";firefox不要用document.all,用document.getElementById(id)/或者用框架
用tableid.style.display=""; 提示tableid未定义.已经给table加上id
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>AlarmInfo</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<LINK href="../html/css001/Page.css" type="text/css" rel="stylesheet">
<LINK href="../image/style.css" type="text/css" rel="stylesheet">
<script language="javascript">
function Check()
{
document.getElementById("qydm").value = "";
document.getElementById("qymc").value = "";
if (document.getElementById("CredCode"))
{
document.getElementById("CredCode").value = "";
}
if (document.getElementById("CarID"))
{
document.getElementById("CarID").value = "";
}
if (document.getElementById("EngineCode"))
{
document.getElementById("EngineCode").value = "";
}
if (document.getElementById("BodyCode"))
{
document.getElementById("BodyCode").value = "";
}
}
function RedioCheck()
{
var opts = document.all("rbTrapType")
if (opts)
{
for (var i = 0; i< opts.length; i++)
{
if (opts[i].checked)
{
if (i = 1)
{
document.getElementById("Table10").style.display = "";
document.getElementById("Table11").style.display = "none";
}
else
{
document.getElementById("Table10").style.display = "none";
document.getElementById("Table11").style.display = "";
}
}
}
}
}
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" action="CHandleList.aspx" method="post" runat="server">
<FONT face="宋体">
<table id="Table5" cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr>
<td><IMG height="67" src="../image/right1-1.jpg" width="855"></td>
</tr>
</table>
<table id="Table6" cellSpacing="0" cellPadding="0" border="0">
<tr>
<td vAlign="top"><IMG height="207" src="../image/right1.jpg" width="34"></td>
<td vAlign="top" align="center">
<table id="Table7" cellSpacing="0" cellPadding="0" border="0">
<tr>
<td width="770">
<table id="Table8" cellSpacing="0" cellPadding="0" border="0">
<tr>
<td width="130" background="../image/right3.jpg">
<div align="center"><span class="style8">
<script language="javascript">document.write(title);</script>
</span>
</div>
</td>
<td><IMG height="26" src="../image/right4.jpg" width="641"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="left"><IMG height="12" src="../image/right5.jpg" width="770"></td>
</tr>
<tr>
<td align="center">
<TABLE id="Table1" cellSpacing="1" cellPadding="0" width="100%" bgColor="#93aabf" border="0">
<TR>
<TD class="InputTitle" bgColor="#f5fafa">查询类型:</TD>
<TD style="WIDTH: 258px" width="258" bgColor="#f5fafa" colSpan="2"><asp:radiobuttonlist id="rbTrapType" runat="server" BackColor="#F5FAFA" RepeatDirection="Horizontal"
Width="168px">
<asp:ListItem Value="0">人员信息</asp:ListItem>
<asp:ListItem Value="1" Selected="True">车辆信息</asp:ListItem>
</asp:radiobuttonlist></TD>
<TD width="212" bgColor="#f5fafa"></TD>
</TR>
<TR class="content" bgColor="#f5fafa">
<TD>企业代码:</TD>
<TD><asp:textbox id="qydm" runat="server" Width="150px" MaxLength="13"></asp:textbox></TD>
<TD>企业名称:</TD>
<TD><asp:textbox id="qymc" runat="server" Width="260px" MaxLength="40"></asp:textbox></TD>
</TR>
<TR>
<TD bgColor="#f5fafa" colSpan="4">
<TABLE class="content" id="Table10" cellSpacing="1" cellPadding="0" width="100%" bgColor="#93aabf"
border="0" runat="server">
<TR bgColor="#1191d1">
<TD style="HEIGHT: 28px" bgColor="#f5fafa" colSpan="4">从业人员信息
<asp:dropdownlist id="ddlCredType" runat="server" Width="160px" Visible="False">
<asp:ListItem Value="0" Selected="True">全部</asp:ListItem>
</asp:dropdownlist><asp:dropdownlist id="ddlPerType" runat="server" Width="160px" AutoPostBack="True" Visible="False">
<asp:ListItem Value="0" Selected="True">全部</asp:ListItem>
<asp:ListItem Value="1">从业人员</asp:ListItem>
<asp:ListItem Value="2">送车人</asp:ListItem>
</asp:dropdownlist></TD>
</TR>
<TR>
<TD width="20%" bgColor="#f5fafa">证件号码:</TD>
<TD width="30%" bgColor="#f5fafa"><INPUT class="InputValue" id="CredCode" style="WIDTH: 168px; HEIGHT: 22px" type="text"
size="22" name="CredCode" runat="server"></TD>
<TD width="20%" bgColor="#f5fafa"></TD>
<TD width="30%" bgColor="#f5fafa"></TD>
</TR>
</TABLE>
</TD>
</TR>
<TD bgColor="#f5fafa" colSpan="4">
<TABLE class="content" id="Table11" cellSpacing="1" cellPadding="0" width="100%" bgColor="#93aabf"
border="0" runat="server">
<TR bgColor="#1191d1">
<TD style="HEIGHT: 28px" bgColor="#f5fafa" colSpan="4">车辆信息</TD>
</TR>
<TR bgColor="#1191d1">
<TD style="HEIGHT: 23px" width="20%" bgColor="#f5fafa">车牌号:</TD>
<TD style="HEIGHT: 23px" width="30%" bgColor="#f5fafa"><INPUT class="InputValue" id="CarID" style="WIDTH: 160px; HEIGHT: 22px" type="text" size="21"
name="CarID" runat="server"></TD>
<TD style="HEIGHT: 23px" width="20%" bgColor="#f5fafa">发动机号:</TD>
<TD style="HEIGHT: 23px" width="30%" bgColor="#f5fafa"><INPUT class="InputValue" id="EngineCode" style="WIDTH: 168px; HEIGHT: 22px" type="text"
size="22" name="EngineCode" runat="server"></TD>
</TR>
<TR bgColor="#1191d1">
<TD bgColor="#f5fafa">车架号码:</TD>
<TD width="30%" bgColor="#f5fafa"><INPUT class="InputValue" id="BodyCode" style="WIDTH: 160px; HEIGHT: 22px" type="text"
size="21" name="BodyCode" runat="server"></TD>
<TD width="20%" bgColor="#f5fafa"></TD>
<TD width="30%" bgColor="#f5fafa"></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR bgColor="#1191d1">
<TD class="InputTitle" bgColor="#f5fafa"></TD>
<TD bgColor="#f5fafa" colSpan="3"> <FONT color="red">* 对企业名称进行模糊查询
<asp:label id="Label1" runat="server" Visible="False">Label</asp:label></FONT></TD>
</TR>
<TR bgColor="#1191d1">
<TD style="HEIGHT: 20px" align="center" bgColor="#f5fafa" colSpan="4"><asp:button id="btnQuery" runat="server" Width="70" Height="20" Text="查询"></asp:button>
<INPUT id="Reset1" style="WIDTH: 70px; HEIGHT: 20px" onclick="Check()" type="button" value="清空"
name="Reset1">
</TD>
</TR>
<TR>
<TD style="HEIGHT: 20px" align="center" bgColor="#f5fafa" colSpan="4"><asp:datagrid id="dgList" runat="server" Width="100%" BorderColor="GrayText" AllowPaging="True"
DataKeyField="布控ID">
<FooterStyle HorizontalAlign="Right"></FooterStyle>
<HeaderStyle ForeColor="White" BackColor="#568EC7"></HeaderStyle>
<Columns>
<asp:ButtonColumn Text="查看" HeaderText="详细信息" CommandName="Alarm"></asp:ButtonColumn>
</Columns>
<PagerStyle HorizontalAlign="Right" Mode="NumericPages"></PagerStyle>
</asp:datagrid></TD>
</TR>
<TR>
<TD align="center" bgColor="#f5fafa" colSpan="4"></TD>
</TR>
</TABLE>
</td>
</tr>
</table>
</td>
<td vAlign="top" align="left"><IMG height="207" src="../image/right2.jpg" width="51"></td>
</tr>
</table>
</FONT>
</form>
</body>
</HTML>
<TABLE class="content" id="Table22" cellSpacing="1" cellPadding="0" width="100%" bgColor="#93aabf"
border="0" >
<TR bgColor="#1191d1">
<TD style="HEIGHT: 28px" bgColor="#f5fafa" colSpan="4"> 车辆信息 </TD>
</TR>
</TABLE>
</table>
<input type="button" value="btn" onclick="a()">
<script>
function a()
{
if(document.getElementById('Table22').style.display=="block")
{
document.getElementById('Table22').style.display="none"
}else
{document.getElementById('Table22').style.display="block"}
}
</script>