当前位置: 代码迷 >> ASP.NET >> 包含此控件的页面运行后,前台怎么用JS 怎么得到 复选框选中的值呢? 前台根本就没有显示value这个属性。如何得到?(不像后台得到那么容
  详细解决方案

包含此控件的页面运行后,前台怎么用JS 怎么得到 复选框选中的值呢? 前台根本就没有显示value这个属性。如何得到?(不像后台得到那么容

热度:908   发布时间:2013-02-26 00:00:00.0
包含此控件的页面运行后,前台如何用JS 如何得到 复选框选中的值呢? 前台根本就没有显示value这个属性。怎么得到?(不像后台得到那么容
<asp:checkboxlist   id= "chkBook "     runat= "server ">
<asp:ListItem   Value= "A "> 1111 </asp:ListItem>
<asp:ListItem   Value= "B "> 2222 </asp:ListItem>
<asp:ListItem   Value= "C "> 3333 </asp:ListItem>
<asp:ListItem   Value= "D "> 4444 </asp:ListItem>
<asp:ListItem   Value= "E "> 5555 </asp:ListItem>
<asp:ListItem   Value= "F "> 6666 </asp:ListItem>
</asp:checkboxlist>


包含此控件的页面运行后,前台如何用JS   如何得到   复选框选中的值呢?   前台根本就没有显示value这个属性。怎么得到?(不像后台得到那么容易啊)


------解决方案--------------------------------------------------------
遍历所有的CheckBox,检查checked属性,如果为true,则读取value。
  相关解决方案