,织梦dedecms指定栏目搜索实现办法:, ,在搜索结果页添加:, ,<input type=”hidden” name=”typeid” value=”1,4″ />, ,value=”1,4″就是你要指定的一个或多个栏目,多个栏目用,号隔开。, ,例如:,<form name=”formsearch” action=”{dede:global.cfg_cmsurl/}/plus/search.php”>,<div class=”form”>,<h4>搜索</h4>,<input type=”hidden” name=”kwtype” value=”0″ />,<input type=”hidden” name=”typeid” value=”1,4″ />,<input name=”q” type=”text” class=”search-keyword” id=”search-keyword” value=”在这里搜索…” onfocus=”if(this.value==’在这里搜索…’){this.value=”;}” onblur=”if(this.value==”){this.value=’在这里搜索…’;}” />,<button type=”submit” class=”search-submit”>搜索</button>,</div>,</form>, ,按栏目分类搜索下拉 实现方法:, ,<form action=”{dede:field name=’phpurl’/}/search.php” name=”formsearch”>, ,<div class=”form”>, ,<h4>搜索</h4>, ,<input type=”hidden” name=”kwtype” value=”0″ />, ,<input type=”hidden” name=”searchtype” value=”titlekeyword” />, ,<input name=”keyword” type=”text” class=”search-keyword” id=”search-keyword” />, ,<select name=”typeid” class=”search-option” id=”typeid”>, ,<option value=’0′ selected=’1′>全部栏目</option>, ,{dede:channelartlist typeid=’top’ }, ,{dede:type} <option value='[field:id/]’>[field:typename/]</option>{/dede:type}, ,{dede:channel type=’son’ noself=’yes’}, ,<option value='[field:id/]’>-[field:typename/]</option>, ,{/dede:channel}, ,{/dede:channelartlist}, ,</select><button type=”submit” class=”search-submit”>搜索</button> , ,</div>, ,</form>