|
主题:[已解决]官方:请帮忙看下模版中使用以下筛选代码,无法实现自定义筛选是什么原因? [收藏主题] | 转到: |
|
|
支持(0) | 反对(0) 顶端 底部 |
<!--主要start-->
<div class="detail_txt mgt12 left" style="width:757px;"> <div class="selected relative"><b class="title">专家选择:</b></div> <div class="search_list pd15"> <ul> {KS:Filter("分类检索","ClassID")} {KS:Filter("姓名检索","experts_suoyin")} {KS:Filter("职 称","experts_zc")} {KS:Filter("所属科室","experts_ssks")} </ul> </div> <div class="clear"></div> <div class="profess_list pd10"> <p><b class="bt left">专家列表</b></p> <span class="right">进一步查找专家:<input type='text' name='keyword' value='[KS:SearchKey]' id='keyword' class="search_input mgr10" /><input type='submit' value='搜索' class="search_btn" /></span> <script> function searchByClass(){ var key=jQuery("#keyword").val(); if (key==''){ // alert('请输入搜索关键字!'); // return; } var url=location.href; var newurl=''; if (url.indexOf('?')==-1){ newurl=url+'?key-'+key; }else{ var param=url.split('?')[1]; var newparam=getNewSearchParam(param); newurl=url.split('?')[0]+'?'+newparam; } location.href=newurl; } function getNewSearchParam(param){ var key=jQuery("#keyword").val(); var parr=param.split(','); var newparam=''; for (var i=0;i<parr.length;i++){ var pparr=parr[i].split('-'); if (pparr[0]=='key'){ if (newparam==''){ newparam='key-'+(key); }else{ newparam+=',key-'+(key); } }else{ if (newparam==''){ newparam=parr[i]; }else{ newparam+=','+parr[i]; } } } if (newparam.indexOf('key-')==-1 && key!=''){ if (newparam==''){ newparam='key-'+key; }else{ newparam+=',key-'+(key); } } return newparam; } </script> <!---筛选 end--> <div class="clear"></div> <ul class="mgt12" style="border-top:1px solid #DDD"> <!-- 获取查询条件 --> [Loop Times="12"] <li> <div class="img left"><a href="{$Field(InfoID,url,1,3)}"><img src="{$Field(DefaultPic,text,0,...,2,/sysimg/nopic.gif)}" width="80" height="107" alt="{$Field(title,text,0,,2,)}"></a></div> <div class="txt pd5"> <p><a href="{$Field(InfoID,url,1,3)}">{$Field(title,text,24,,2,)}</a></p> <p>{$Field(experts_zc,text,0,...,2,)}</p> <p class="green">所属科室:</p> <p>{$Field(experts_ssks,text,0,...,2,)}</p> </div> </li> [/Loop] <div class="clear"></div> [KS:PageStr4] </ul> <div class="clear"></div> </div><!-- visit END --> </div> <!--主要end--> |
|
支持(0) | 反对(0) 顶端 底部 |
支持(0) | 反对(0) 顶端 底部 |
<上一主题 | 下一主题 > |