CheckBoxList的Onclick事件 [英] Onclick Event of a CheckBoxList

查看:58
本文介绍了CheckBoxList的Onclick事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个组合框和一个复选框列表,当用户在组合框中选择选项时,复选框列表中的选项也会更改.
我在两个框下都有一个文本框,我想从复选框列表中获取用户已选择的项目.我无法获得CheckBoxList的 onclick 事件.有人可以帮忙吗?

I have a combobox and a checkboxlist where the options in the checkboxlist change when the user selects the options in the combobox.
I also have a textbox under the both wherein I want to get the item which the user has selected from the checkboxlist. I am not able to get a onclick event for CheckBoxList. Can anyone help?

推荐答案

只需将checkboxlist的autopostback属性设置为true.
并读取复选框文本并设置为:
textbox.text = checkboxlist.selecteditem.text;
just set autopostback property of checkboxlist to true.
and read checked box text and set to :
textbox.text=checkboxlist.selecteditem.text;



jQuery具有执行此类任务的简单技术,这可能会给您一些解决问题的想法

< script>
Hi,
jquery has some easy tech to do such kind of tasks, this might give you some idea to solve your problem

<script>


(function(){
(function () {


这篇关于CheckBoxList的Onclick事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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