利用jsearch怎样搜索特定栏目里的信息?

解决方法:

以下提供前台调用样例表单代码:

<table border="0" cellspacing="0" cellpadding="0" style="line-height: 20px">
    <form method="get" action="http://www.xxx.gov.cn/jsearch/index.jsp" target="_blank" name="qForm">
        <tbody>
            <tr>
                <td width="145"><input id="q" οnblur="if(this.value==&quot;&quot;){this.value=&quot;请您输入关键字&quot;}" οnclick="if(this.value==&quot;请您输入关键字&quot;){this.value=&quot;&quot;;this.focus();}" style="padding-left: 5px; width: 140px; color: #909090" name="q" value="请您输入关键字" type="text" /> <input type="hidden" name="pagemode" value="result" /><input type="hidden" name="style" value="1" /><input type="hidden" name="appid" value="1" /><input type="hidden" name="ck" value="0" /><input id="pos" type="hidden" name="pos" value="title,content" /><input type="hidden" name="colgroup" value="1,2,3,4,5" /></td>
                <td width="61"><input src="http://www.xxx.gov.cn/picture/0/101029152324256.gif" type="image" name="imageField" /></td>
            </tr>
        </tbody>
    </form>
</table>

上述代码中查询特定栏目需要选取一个jsearch库,这里显示的库:<input type="hidden" name="appid" value="1" />,版面套系要和库一致:<input type="hidden" name="style" value="1" />,colgroup就是控制所要搜索的栏目:<input type="hidden" name="colgroup" value="1,2,3,4,5" />

 

通过以上前台调用代码可以搜索特定的栏目(上述栏目id为1,2,3,4,5)。


 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值