怎么js中触发点击事件combobox中onChange事件

怎么触发combobox中onChange事件
& 怎么触发combobox中onChange事件
Started by:
Number of posts: 6
怎么触发combobox中onChange事件
我使用了easyUI中的combobox控件,需要在combobox值被改变时触发事件,类似普通&select …. onChange="doSomeThing();"/&,但是我无法触发combobox控件的onChange()事件,请问我该怎么才能获得onChange()事件,还有就是如何获得该combobox当前所选定的值,谢谢!我的代码如下:
I have used combobox of easyUI,Need to be changed in the combobox the value of trigger events,sames General tag &select …onChange="doSomeThing();"/& ,but i couldn't get it,I ask how to get onChange () event,and how to get the currently selected value of combobox ,thinks, My code is as follows:
&meta http-equiv="Content-Type" content="text/ charset=UTF-8"&
&title&jQuery EasyUI&/title&
&link rel="stylesheet" type="text/css" href="../themes/default/easyui.css"&
&link rel="stylesheet" type="text/css" href="../themes/icon.css"&
&script type="text/javascript" src="../jquery.js"&&/script&
&script type="text/javascript" src="../jquery.easyui.min.js"&&/script&
$().ready(function(){
$('#cc').change(function(n,o){
alert("value changed!"); //could not arrive!
$('#chooseValue').click(function(){
alert("value selected is=" + jQuery("#cc").val());
&h1&ComboBox&/h1&
&span&Options: &/span&
&select id="cc" class="easyui-combobox" name="dept" style="width:150"&
&option value="aa"&abcd&/option&
&option value="cerc"&efgh&/option&
&option value="crwerc"&gfdsfda&/option&
&option value="crwerc"&fdsafadsfsad&/option&
&option value="cewrwerc"&fsadfadsf&/option&
&option value="cfdsc"&fdsafsa&/option&
&option value="ds"&fdsafds&/option&
&input id="chooseValue" type="button" value="value of selected"/&
Last edited on
Re: 怎么触发combobox中onChange事件
$('#cc').combobox({
onChange:function(newValue,oldValue){
alert(newValue);
To get the field value, you could invoke the 'getValue' method. The code looks like this:
$('#cc').combobox('getValue');
Re: 怎么触发combobox中onChange事件
It was quite effective,thank you very much!
easyui form components such as datebox, validationbox, combobox cannot display in correct position when style is absolut
Recently, after few weeks studying in easyui. I found it was a good web ui presentation framework.
But I met a problem during the test period. The below code which is problem I met. The easyui form component cannot present in correct absolution position.
&!DOCTYPE html PUBLIC &-//W3C//DTD HTML 4.01 Transitional//EN& &http://www.w3.org/TR/html4/loose.dtd&&
&meta http-equiv=&Content-Type& content=&text/ charset=UTF-8&&
&title&DateBox - jQuery EasyUI Demo&/title&
&link rel=&stylesheet& type=&text/css& href=&../themes/default/easyui.css&&
&link rel=&stylesheet& type=&text/css& href=&../themes/icon.css&&
&link rel=&stylesheet& type=&text/css& href=&demo.css&&
&script type=&text/javascript& src=&../jquery-1.6.min.js&&&/script&
&script type=&text/javascript& src=&../jquery.easyui.min.js&&&/script&
&script type=&text/javascript& src=&../locale/easyui-lang-zh_TW.js&&&/script&
&h2&DateBox&/h2&
&input id=&dd& class=&easyui-datebox& required=&true& style='position:top:100left:100px'&&/input&
I am looking forward to hear from you soon and help us to solve this issue. This will help us to decide to select easyui as our front-end framework in our business application. and we will are glad to buy the commerical license if we confirmed this framework is suitable for our upgrade requirement.
Best Regards,
Last edited on
Re: easyui form components such as datebox, validationbox, combobox cannot display in correct position when style is absolut
The datebox is an inline component, so the 'position:absolute' style is not valid.
To solve this issue, wrap a block element for it:
&div style=&position:top:100left:100px&&
&input id=&dd& class=&easyui-datebox& required=&true&&&/input&
Re: easyui form components such as datebox, validationbox, combobox cannot display in correct position when style is absolut
Thanks! We will try it.
Powered by
Unless otherwise stated, the content of this page is licensed under
Click here to edit contents of this page.
Click here to toggle editing of individual sections of the page (if possible).
Watch headings for an &edit& link when available.
Append content without editing the whole page source.
Check out how this page has evolved in the past.
If you want to discuss contents of this page - this is the easiest way to do it.
View and manage file attachments for this page.
A few useful tools to manage this Site.
See pages that link to and include this page.
Change the name (also URL address, possibly the category) of the page.
View wiki source for this page without editing.
View/set parent page (used for creating breadcrumbs and structured layout).
Notify administrators if there is objectionable content in this page.
Something does not work as expected? Find out what you can do.
documentation and help section.
Terms of Service - what you can, what you should not etc.
Privacy Policy.匿名用户不能发表回复!|
每天回帖即可获得10分可用分!小技巧:
你还可以输入10000个字符
(Ctrl+Enter)
请遵守CSDN,不得违反国家法律法规。
转载文章请注明出自“CSDN(www.csdn.net)”。如是商业用途请联系原作者。ComboBox的Change事件为什么不支持中文输入?比如将ComboBox的rowsource属性改为sheet!A1:A5,A1=abcd,然后在ComboBox中输入a,就会自动跳出abcd,类似于工作表列中的自动记忆键入功能, 中文能否实现以上功能?
友情帮顶,希望楼主再日找到自己想要的答案.
祝你一帆风顺,财源丰盛!
Combobox.SelectedIndex = 0 //是SelectIndex还是SelectedIndex有点忘记了,反正你看下就知道了。
如果是数据是从数据库中取的,那么SQL语句就写成“select distinct 列名 from 表名”
Enabled = False应该可以吧
你的代码作如下修改,就不会出现类型不匹配的问题:Private Sub Command1_Click()Label1.Visible = TrueText1.V...
答: #Centara Grand Mirage Beach Resort Pattaya (芭堤雅圣塔拉幻影海滩度假村)#家庭房可以住几个人
答: 好在有许多成熟的安全和网络技术,例如虚拟私有网络(VPN)和防火墙等,能够极大地提高Web服务应用的安全和性能,让开发者拥有选择安全技术的自由,而不是非得使用尚...
答: 某些ADSL调制解调器使用USB接口与电脑相连,需要在电脑上安装指定的软件以添加虚拟网卡来进行通信
大家还关注
确定举报此问题
举报原因(必选):
广告或垃圾信息
激进时政或意识形态话题
不雅词句或人身攻击
侵犯他人隐私
其它违法和不良信息
报告,这不是个问题
报告原因(必选):
这不是个问题
这个问题分类似乎错了
这个不是我熟悉的地区
相关问答:123456789101112131415extjs combobox 如何获取点击事件
- ITeye问答
extjs combobox 我想获取点击输入框旁边那个按钮的事件,expand事件满足不了我的需求。求指教&
你的需求到底是什么?
change---显示的值改变事件
select---选中选项事件
expand---下拉框展开事件
collapse--下拉框折叠事件
基本能满足需要了吧
var combo = new boBox({
store: store,
displayField:'state',
typeAhead: true,
mode: 'local',
forceSelection: true,
triggerAction: 'all',
emptyText:'Select a state...',
selectOnFocus:true,
applyTo: 'local-states',
onTriggerClick:function(){
alert('abc');
ComboBox没的click事件,下拉按钮的点击事件处理是通过重载从Ext.form.TriggerFiled中继承的方法onTriggerClick实现,如上我给的实现,但是这种实现破坏了combobox原有的功能。
要不你描述下有何有需求,怎么可能expand事件满足不了呢
是那个用户在点击下拉箭头,onTriggerClick 这个吧。
已解决问题
未解决问题boBox change事件的BUG - LoveBeyond - ITeye博客
博客分类:
因为项目需要,想用Ext的combo控件实现动态级联,发现combo确实不好用,也可能是我对这个组建不熟悉吧,拿动态级联来讲,首先我们能想到的触发事件肯定就是change事件了,可不幸的是,这个change时间并不像我们原生的HTML中的 select的onchange事件,这个change事件需要使当前控件失去焦点、或者在空白处点击下才能达到和select中onchange一样的效果,我有点想不明白,Ext开发小组难道有意这么做吗?还是这是个BUG,在我看来这个change事件有和没有区别不大,所以我这里只能用select时间代替change事件了。
'select' : function(combo, rex, index ){
alert(index);
浏览: 175175 次
来自: 深圳
mongodb 需要auth 怎么加呢?
xie666 写道html.push('&td alig ...
html.push('&td align=&c ...
bushkarl 写道那我后台用struts2,我的name一 ...
这样不会按照你想要的顺序加载。

我要回帖

更多关于 c 中的事件触发 的文章

 

随机推荐