项目要用到一个可选可编辑的下拉控件,我用了jQuery easyui中的combobox,可以出现类似自动填充的效果,这个刚好符合项目要求.但是后来发现,这个控件的onChange事件没用,到网上查了才没有这方面的问题,看了看easyui的文档,他要求onChanage要有两个参数newValue和oldValue,我不太明白,哪位兄弟帮我解决一下,谢谢.
easyui官网:http://jquery-easyui.wikidot.com/
文档:http://jquery-easyui.wikidot.com/document:combobox
我的JSP页面代码(节选)
[code="java"]
<script src="${ctx}/js/jquery.easyui.min.js" type="text/javascript"></script>
<script src="${ctx}/js/calendar.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="${ctx}/css/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${ctx}/css/icon.css">
function driverOnChanage(){
alert("触发了事件");
}
[/code]
[code="java"]
${driver.driverName}
/s:iterator
[/code]
这个是文档上的一些内容
Events
Name Parameters Description
onChange newValue, oldValue Fires when the field value is changed.