动易SiteWeaver 搜索代码

<input id="keyword" value="" />
<input id="submitSearch" onclick="submitSearch()" type="button" value="搜索" />
<select id="search" name="search">
<option value="Article">文章</option>
<option value="Photo">图片</option>
<option value="Soft">下载</option>
</select>
<input name="Field" type="hidden" id="Field" value="Title">
<script type="text/javascript">
function submitSearch() {
var keyword = document.getElementById('keyword').value;
var option = document.getElementById('search').value;
if (keyword == '') {
alert('请输入关键字');
return;
}

var Field
if (option=="Article"){
Field="Title";
}

if (option=="Photo"){
var Field="PhotoName";
}

if (option=="Soft"){
var Field="SoftName";
}


var url = option + "/search.asp?keyword=" + escape(keyword)+"&Field="+Field;
location = url
}
</script>

  网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)