The sample code below is extended from
http://www.jeasyui.com/demo/main/index.php?plugin=SearchBox&theme=default&dir=ltr&pitem=Search%20Category<input class="easyui-searchbox" data-options="prompt:'Please Input Value',menu:'#mm',searcher:doSearch" style="width:300px"></input>
<div id="mm">
<div data-options="name:'all',iconCls:'icon-ok'">All News</div>
<div data-options="name:'sports'">Sports News</div>
</div>
<script>
function doSearch(value,name){
var dg = $('#dg'); // the datagrid
dg.datagrid('load', { // reload the datagrid data by passing the 'q' and 'category' parameters to server
q: value,
category: name
});
}
</script>