使用asp.net检查复选框时防止断行

时间:2014-12-14 11:42:00

标签: javascript html asp.net visual-studio-2012

如何在勾选复选框(使用ASP.net)后防止断行? [我必须在勾选复选框之前隐藏文字]

<tr>
<td class="auto-style48" style="vertical-align:top">
 Click to forward calls to phone:</td>
<td class="auto-style26">

<script type="text/javascript">
function toggle_visibility(CheckBoxForward2Phone) {
    var e = document.getElementById(CheckBoxForward2Phone);
    if (e.style.display == 'block')
        e.style.display = 'none';
    else
        e.style.display = 'block';
}
</script>

<a href="#" onclick="toggle_visibility('CheckBoxForward2Phone');">
<asp:CheckBox ID="tbForward2Phone" runat="server" /></a>&nbsp;
<div id="CheckBoxForward2Phone" style="display: none;">
Please forward incoming calls to my number/s, to my regular phone number at:<br />
<asp:TextBox ID="Forward2PhoneBox" runat="server"></asp:TextBox>
<br />
</div>
  </td>
  </tr>

0 个答案:

没有答案