首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

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

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

包含此控件的页面运行后,前台如何用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。

热点排行