javascript表格中的复选框可见或不可见(asp.net控件) [英] javascript for checkboxes in a table to get visible or not visible(asp.net control)

查看:89
本文介绍了javascript表格中的复选框可见或不可见(asp.net控件)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



i在表格中包含所有元素(主要是chevkbox)。如果我选​​中一个复选框,则它下面的剩余复选框(放在表格中)应该是可见的。我需要在其中开发它javascript请帮帮我


示例代码简要介绍我的结构


i have all elements(mostly chevkboxes) inside a table.if i check a check box the remaining checkboxes under it(placed in table) should be visible .i need to develop it in javascript pls help me out

sample code to give brief intro of my structure

展开 | 选择 | 换行 | 行号

推荐答案



i在表格中包含所有元素(主要是chevkbox)。如果我选​​中一个复选框,则在其下面的其余复选框(放在表格中)应该是可见的。我需要发展它在javascript中请帮助我


示例代码简要介绍我的结构


< table id =" ; TABLE1"规则= QUOT;无" RUNAT = QUOT;服务器"宽度= QUOT; 100%QUOT; >

< tr>

< td bgcolor ="#6699ff" colspan =" 2">

< asp:CheckBox ID =" cbxProblemsEncounteredDuringSurgery" RUNAT = QUOT;服务器"

Text ="手术中遇到的问题"的AutoPostBack = QUOT;真" />< / td>

< / tr>

< tr>

< td colspan =" 2" >

< table width =" 100%">

< tr>

< td>

< asp:CheckBox ID =" cbxConversionfromendoscopetoopenprocedure" RUNAT = QUOT;服务器" Text =从内窥镜到开放程序的转换的AutoPostBack = QUOT;真" />< / td>

< td>

< asp:CheckBox ID =" cbxHemorrhage" runat =" server"

Text =" Hemorrhage"的AutoPostBack = QUOT;真" />< / td>

< / tr>

< tr>

< td>

< asp:CheckBox ID =" cbxProlownedsurgerybeyondavgduration" RUNAT = QUOT;服务器" Text =延长超出平均手术时间的AutoPostBack = QUOT;真" />< / td>

< td>

< asp:CheckBox ID =" cbxUnplannedprocedurerequiringchangeofanaesthe ticplan" RUNAT = QUOT;服务器" Text =需要改变麻醉计划的计划外程序的AutoPostBack = QUOT;真" />< / td>

< / tr>

< / table>

< / td>

< / tr>

< / table>


如果检查手术期间遇到的问题,则检查其他元素在tr之下必须启用它们再次放在一个表中。动态可见

i have all elements(mostly chevkboxes) inside a table.if i check a check box the remaining checkboxes under it(placed in table) should be visible .i need to develop it in javascript pls help me out

sample code to give brief intro of my structure


<table id="TABLE1" rules="none" runat="server" width="100%" >
<tr>
<td bgcolor="#6699ff" colspan="2">
<asp:CheckBox ID="cbxProblemsEncounteredDuringSurgery" runat="server"
Text="Problems Encountered During Surgery" AutoPostBack="True" /></td>
</tr>
<tr>
<td colspan="2">
<table width="100%">
<tr>
<td>
<asp:CheckBox ID="cbxConversionfromendoscopetoopenprocedure" runat="server" Text="Conversion from endoscope to open procedure" AutoPostBack="True" /></td>
<td>
<asp:CheckBox ID="cbxHemorrhage" runat="server"
Text="Hemorrhage" AutoPostBack="True" /></td>
</tr>
<tr>
<td>
<asp:CheckBox ID="cbxProlongedsurgerybeyondavgduration" runat="server" Text="Prolonged surgery beyond avg.duration" AutoPostBack="True" /></td>
<td>
<asp:CheckBox ID="cbxUnplannedprocedurerequiringchangeofanaesthe ticplan" runat="server" Text="Unplanned procedure requiring change of anaesthetic plan" AutoPostBack="True" /></td>
</tr>
</table>
</td>
</tr>
</table>


if Problems Encountered During Surgery is checked then other elements in below "tr" which are again placed in a table must be enabled.ie dynamically visible



hi,

i包含所有元素如果我选中一个复选框,其下面的剩余复选框(放在表格中)应该是可见的。我需要在javascript中开发它请帮我出来


示例代码简要介绍我的结构


< table id =" TABLE1"规则= QUOT;无" RUNAT = QUOT;服务器"宽度= QUOT; 100%QUOT; >

< tr>

< td bgcolor ="#6699ff" colspan =" 2">

< asp:CheckBox ID =" cbxProblemsEncounteredDuringSurgery" RUNAT = QUOT;服务器"

Text ="手术中遇到的问题"的AutoPostBack = QUOT;真" />< / td>

< / tr>

< tr>

< td colspan =" 2" >

< table width =" 100%">

< tr>

< td>

< asp:CheckBox ID =" cbxConversionfromendoscopetoopenprocedure" RUNAT = QUOT;服务器" Text =从内窥镜到开放程序的转换的AutoPostBack = QUOT;真" />< / td>

< td>

< asp:CheckBox ID =" cbxHemorrhage" runat =" server"

Text =" Hemorrhage"的AutoPostBack = QUOT;真" />< / td>

< / tr>

< tr>

< td>

< asp:CheckBox ID =" cbxProlownedsurgerybeyondavgduration" RUNAT = QUOT;服务器" Text =延长超出平均手术时间的AutoPostBack = QUOT;真" />< / td>

< td>

< asp:CheckBox ID =" cbxUnplannedprocedurerequiringchangeofanaesthe ticplan" RUNAT = QUOT;服务器" Text =需要改变麻醉计划的计划外程序的AutoPostBack = QUOT;真" />< / td>

< / tr>

< / table>

< / td>

< / tr>

< / table>


如果检查手术期间遇到的问题,则检查其他元素在tr之下必须启用它们再次放在一个表中。动态可见

i have all elements(mostly chevkboxes) inside a table.if i check a check box the remaining checkboxes under it(placed in table) should be visible .i need to develop it in javascript pls help me out

sample code to give brief intro of my structure


<table id="TABLE1" rules="none" runat="server" width="100%" >
<tr>
<td bgcolor="#6699ff" colspan="2">
<asp:CheckBox ID="cbxProblemsEncounteredDuringSurgery" runat="server"
Text="Problems Encountered During Surgery" AutoPostBack="True" /></td>
</tr>
<tr>
<td colspan="2">
<table width="100%">
<tr>
<td>
<asp:CheckBox ID="cbxConversionfromendoscopetoopenprocedure" runat="server" Text="Conversion from endoscope to open procedure" AutoPostBack="True" /></td>
<td>
<asp:CheckBox ID="cbxHemorrhage" runat="server"
Text="Hemorrhage" AutoPostBack="True" /></td>
</tr>
<tr>
<td>
<asp:CheckBox ID="cbxProlongedsurgerybeyondavgduration" runat="server" Text="Prolonged surgery beyond avg.duration" AutoPostBack="True" /></td>
<td>
<asp:CheckBox ID="cbxUnplannedprocedurerequiringchangeofanaesthe ticplan" runat="server" Text="Unplanned procedure requiring change of anaesthetic plan" AutoPostBack="True" /></td>
</tr>
</table>
</td>
</tr>
</table>


if Problems Encountered During Surgery is checked then other elements in below "tr" which are again placed in a table must be enabled.ie dynamically visible



你给tr或td一个id然后你可以使用document.getElementById并设置那个元素' 's style.display =" none"。

试试并发布一些代码。

You give the tr or td an id then you can use document.getElementById and set that element''s style.display = "none".
Try it and post some code.


你想简单地隐藏和显示,或者你真的想要删除和显示(换句话说,复选框占用的空间是否被添加到屏幕上)?
Do you want to simply hide and make visible or do you actually want to remove and display (in other words, the space taken by the checkboxes is added and removed from the screen)?


这篇关于javascript表格中的复选框可见或不可见(asp.net控件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆