在博客中添加21ic器件搜索代码

erica Post at 2006/8/11 9:45:00

<script type="text/javascript">
<!--//
function SearchBBS()
{
 frmSearch.action = "club/query/default.asp";
 frmSearch.submit();
}
function SearchBlog()
{
 frmSearch.action = "list.asp";
 frmSearch.keyword.value = frmSearch.kw.value;

 switch(frmSearch.type.value)
 {
  case "1":
   frmSearch.selecttype.value = "topic";
   break;
  case "2":
   frmSearch.selecttype.value = "id";
   break;
 }

 frmSearch.submit();
}

function doChipsetSearch()
{
 if (document.FormChipsetSearch.T1.value=='IC型号')
 {
  window.alert("21IC提醒:什么型号都不写,搜什么啊!?");
  document.FormChipsetSearch.T1.value='';
  document.FormChipsetSearch.T1.focus();
  return false
 }
 if (document.FormChipsetSearch.T1.value.length<4) {
  window.alert("21ic提示:请输入至少4个字符的型号");
  document.FormChipsetSearch.T1.focus();
  return false
 }
 switch(FormChipsetSearch.Catalog.value)
 {
  case "1":
   FormChipsetSearch.action = "http://www.21ic.com.cn/kucun/search.asp";
   break;
  case "2":
   FormChipsetSearch.action = "http://www.21icsearch.com/parts/price/default.asp?admin=";
   break;
  case "3":
   FormChipsetSearch.action = "http://www.21icsearch.com/searchpdf/default.asp?admin=";
   break;
 }
}
//-->
</script>

<form name="FormChipsetSearch" onsubmit="return doChipsetSearch()" method="post" target="_blank">

<div class="icsearch"><div class="icsearch"><input size="18" value="IC型号"  name="T1" /><select size="1" name="Catalog"><option value="1" selected="selected">货源</option><option value="2">价格</option><option value="3">资料</option></select><input type="submit" value="搜" /></div></div>
 </div>

已有 0 位网友发表了看法