javascript获取.net控件的ClientId
<script language="javascript" type="text/javascript">
function show() {
if (document.getElementById("<%=RBut1.ClientID%>").checked == true) {
document.getElementById("<%=lblQueryID.ClientID%>").innerHTML = "RunIDs: ";
}
if (document.getElementById("<%=RBut2.ClientID%>").checked == true) {
document.getElementById("<%=lblQueryID.ClientID%>").innerHTML = "RunQueryID: ";
}
}
</script>
<table border="0" style="width: 100%;">
<tr>
<td>
We can use a Run Query ID or Runs' ID to serach the unanalyzed results for automation
runs.<br />
</td>
</tr>
<tr>
<td>
<asp:RadioButton ID="RBut1" runat="server" Text="RunIDs (e.g 937311;940816;940970)"
GroupName="W" Checked="True" onclick="show()" />
</td>
</tr>
<tr>
<td>
<asp:RadioButton ID="RBut2" runat="server" Text="RunQueryID (e.g 156081)" GroupName="W"
onclick="show()" />
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblQueryID" runat="server" Text="RunIDs: " Font-Bold="True" Font-Size="Medium"></asp:Label>
</td>
</tr>
</table>
function show() {
if (document.getElementById("<%=RBut1.ClientID%>").checked == true) {
document.getElementById("<%=lblQueryID.ClientID%>").innerHTML = "RunIDs: ";
}
if (document.getElementById("<%=RBut2.ClientID%>").checked == true) {
document.getElementById("<%=lblQueryID.ClientID%>").innerHTML = "RunQueryID: ";
}
}
</script>
<table border="0" style="width: 100%;">
<tr>
<td>
We can use a Run Query ID or Runs' ID to serach the unanalyzed results for automation
runs.<br />
</td>
</tr>
<tr>
<td>
<asp:RadioButton ID="RBut1" runat="server" Text="RunIDs (e.g 937311;940816;940970)"
GroupName="W" Checked="True" onclick="show()" />
</td>
</tr>
<tr>
<td>
<asp:RadioButton ID="RBut2" runat="server" Text="RunQueryID (e.g 156081)" GroupName="W"
onclick="show()" />
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblQueryID" runat="server" Text="RunIDs: " Font-Bold="True" Font-Size="Medium"></asp:Label>
</td>
</tr>
</table>