Easyui 搜索框的折叠与展开方法
HTML 文件:
<div id="searchForm" region="north" title="XXXX查询" collapsed="true" style="height:185px;overflow-y: hidden"> <form id="mysearch" method="post" class="searchForm"> <ul class="searchUl"> <li class="searchLi"><span class="searchTitle">XXXXX:</span><span><input id="XXX" name="XXXX" class="easyui-textbox" value="" /></span></li> </ul> <ul class="searchUl" style="margin-top:-8px"> <li><a id="searchbtn" class="easyui-linkbutton">查询</a> <a id="clearbtn" class="easyui-linkbutton">清空</a></li> </ul> </form> </div>
JS文件:
//页面搜索框默认展开 $('body').layout('expand', 'north');
//页面搜索框默认折叠
$("#searchForm").layout('collapse','north');