1.<div id = ‘a‘>
$(‘#a‘).组件({
参数
}); (常用,一般获取动态数据)
2.<div class = ‘组件‘ 样式...>
3.多选下拉框的使用:
<input id="admin_dbxm_jhzgSelect" name="jhzgNameIds" />
<a id="admin_dbxm_searchButton" class=‘easyui-linkbutton‘ data-options="iconCls:‘icon-search‘">筛选</a>
<a id="admin_dbxm_cleanSearchButton" class=‘easyui-linkbutton‘ data-options="iconCls:‘icon-cancel‘">清空</a>
<script>
$(‘#admin_dbxm_jhzgSelect‘).combobox({
url:‘${pageContext.request.contextPath}/userAction!xxx.action‘,
valueField:‘id‘, //保存数据库中
textField:‘realname‘,//前台显示,和后台javabean中的属性对应
multiple:true,
panelHeight:‘auto‘
});
$(‘#admin_dbxm_searchButton‘).bind(‘click‘, function(){
jhzgNameIds = $(‘#admin_dbxm_jhzgSelect‘).combobox(‘getValues‘);
admin_dbxm_datagrid.datagrid(‘load‘,
{
jhzgNameIds:jhzgNameIds.toString(),
ky: admin_dbxm_ky,
nd: admin_dbxm_nd
});
});
$(‘#admin_dbxm_cleanSearchButton‘).bind(‘click‘, function(){
admin_dbxm_datagrid.datagrid(‘load‘,
{
ky: admin_dbxm_ky,
nd: admin_dbxm_nd
});
$(‘#admin_dbxm_jhzgSelect‘).combobox(‘clear‘);
});
</script>
原文地址:https://www.cnblogs.com/xiaolige/p/8868121.html