搜索页面左边树型搜索结果代码 修改

<%
if Chkrequest(sortid) then
sortsql="select class_2.typeid,class_2.typename,class_1.* from class_2,class_1 where class_2.sortid="&sortid&" and class_1.sortid=class_2.sortid"
set rssort=conn.execute(sortsql)
if rssort.eof then
response.write"暂无信息"
else
if Getsearchsortcount4>0 then response.write"<b><A href='searchall.asp?sortid="&sortid&"&keywords="&keywords&"'>"&rssort("sort")&"</A> ("&Getsearchsortcount4&")</b><br>"
do while not rssort.eof
response.write"<span class=lh13>"
if Getsearchtypecount4>0 then response.write"·<a href='searchall.asp?typeid="&rssort("typeid")&"&keywords="&keywords&"' class='s'>"&rssort("typename")&"</a> ("&Getsearchtypecount4&")<br>"
rssort.movenext   
loop
end if
rssort.close
set rssort=nothing


elseif Chkrequest(typeid) then
typesql="select class_2.typeid,class_2.typename,class_1.* from class_2,class_1 where class_2.typeid="&typeid&" and class_1.sortid=class_2.sortid"
set rstype=conn.execute(typesql)
if rstype.eof then
response.write"暂无信息"
else
if Getsearchsortcount5>0 then response.write"<b><A href='searchall.asp?sortid="&rstype("sortid")&"&keywords="&keywords&"'>"&rstype("sort")&"</A> ("&Getsearchsortcount5&")</b><br><span class=lh15>"
if Getsearchtypecount>0 then response.write"·<a href='searchall.asp?typeid="&rstype("typeid")&"&keywords="&keywords&"' class='s'>"&rstype("typename")&"</a> ("&Getsearchtypecount&")<br>"
end if
rstype.close
set rstype=nothing

else

sortsql="select * from class_1"  
set rssort=conn.execute(sortsql)
if rssort.eof then
response.write"暂无信息"
else
do while not rssort.eof
response.write"<span class=lh15>"
if Getsearchsortcount>0 then response.write" <b><A href='searchall.asp?sortid="&rssort("sortid")&"&keywords="&keywords&"'>"&rssort("sort")&"</A> ("&Getsearchsortcount&")</b><br>"
typesql="select * from class_2 where sortid="&rssort("sortid")&""
set rstype=conn.execute(typesql)
if rstype.eof then
response.write"暂无信息"
else
do while not rstype.eof
if Getsearchtypecount>0 then response.write"·<a href='searchall.asp?typeid="&rstype("typeid")&"&keywords="&keywords&"' class='s'>"&rstype("typename")&"</a> ("&Getsearchtypecount&")<br>"
rstype.movenext   
loop
end if
rstype.close
set rstype=nothing
rssort.movenext
loop
end if
rssort.close
set rssort=nothing
end if
%>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是一个简单的HTML和JavaScript代码示例,用于创建一个状多选下拉列表: ```html <select id="mySelect" multiple> <option value="1">Option 1</option> <option value="2">Option 2</option> <option value="3">Option 3</option> <option value="4">Option 4</option> <option value="5">Option 5</option> <option value="6">Option 6</option> <option value="7">Option 7</option> <option value="8">Option 8</option> </select> <script> // 初始化树型多选下拉列表 $('#mySelect').treeMultiselect({ allowBatchSelection: true, enableSelectAll: true, searchable: true, sortable: true, startCollapsed: true, // 添加形结构 sections: [{ title: 'Section 1', nodes: [{ title: 'Node 1.1', value: '1.1' }, { title: 'Node 1.2', value: '1.2' }] }, { title: 'Section 2', nodes: [{ title: 'Node 2.1', value: '2.1' }, { title: 'Node 2.2', value: '2.2' }] }] }); </script> ``` 在这个示例中,使用了 `treeMultiselect` 插件来创建状多选下拉列表。插件提供了许多配置选项,例如 `allowBatchSelection` 允许批量选择,`enableSelectAll` 允许全选,`searchable` 允许搜索,`sortable` 允许排序,`startCollapsed` 初始时折叠形结构等等。 要添加形结构,需要在 `sections` 中添加一个包含 `title` 和 `nodes` 的对象。 `title` 是该部分的标题, `nodes` 是一个包含节点的数组,每个节点都有一个 `title` 和 `value` 属性。 最后,在页面加载时需要调用 `treeMultiselect` 来初始化状多选下拉列表。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值