var strReturn = ""; var tmp1 = ""; var tmp2 = ""; var tmp3 =""; function CheckForm() { if(document.getElementById("ProClass").selectedIndex < 1) { if(document.getElementById("KeyWord").value == "") { alert("请填写关键字!"); document.getElementById("KeyWord").focus(); return false; } } if (document.getElementById("ProClass").selectedIndex > 0 ) { for( i =0 ; i< document.Form1.ProClass.length; i++) { if(document.Form1.ProClass.options[i].selected == true) { tmp1 = document.Form1.ProClass.options[i].value; break; } } strReturn="aType=" + tmp1.substr(0,2);//document.getElementById("ProClass").options[document.getElementById("ProClass").selectedIndex].Value ;//.Substring(0,2); } else { strReturn="aType=%"; } if (document.getElementById("temp1").value.length > 0) { strReturn = strReturn + "&iType="+ document.getElementById("temp1").value.substr(2,2); } else { strReturn=strReturn + "&iType=%"; } if (document.getElementById("temp2").value.length > 0) { strReturn=strReturn+"&pType="+ document.getElementById("temp2").value.substr(4,2); } else { strReturn=strReturn+"&pType=%"; } if(document.getElementById("KeyWord").value.length > 0) { strReturn = strReturn + "&n=" + document.Form1.KeyWord.value; } else { strReturn= strReturn + "&n=%"; } if(document.getElementById("MinPrice").value.length > 0) { if(isNaN(parseFloat(document.getElementById("MinPrice").value))) { alert('价格输入错误,请重新输入'); document.getElementById("MinPrice").focus(); return false; } else { strReturn = strReturn + "&im=" + parseFloat(document.getElementById("MinPrice").value); } } else { strReturn+="&im=0"; } if(document.getElementById("MaxPrice").value.length > 0) { if(isNaN(parseFloat(document.getElementById("MaxPrice").value))) { alert('价格输入错误,请重新输入'); document.getElementById("MaxPrice").focus(); return false; } else { strReturn = strReturn + "&am=" + parseFloat(document.getElementById("MaxPrice").value); } } else { strReturn+="&am=100000"; } for( i =0 ; i< document.Form1.SearchOrder.length; i++) { if(document.Form1.SearchOrder[i].checked == true) { tmp3 = document.Form1.SearchOrder[i].value; break; } } return true; } function SetButtonIsExecuteSearch() { if(!CheckForm()) { //alert("False"); Form1.action = "#"; return false; } else { //alert("true"); strReturn = strReturn + "&orderby=" + tmp3; window.open("/shop/ps_list.asp?" + strReturn,"_self","",""); return true; } } function selectcas() { var t = 1; ClassId=document.Form1.ProClass.selectedIndex; if(ClassId != 0) { ClassCode=document.Form1.ProClass.options[ClassId].value.substring(0,2); if (document.Form1.SubClass.length>1) { document.Form1.SubClass.length =1; document.Form1.SubClass.options[0].text="==小类=="; document.Form1.SubClass.options[0].selected=true; } if (document.Form1.BrandName.length>1) { document.Form1.BrandName.length =1; document.Form1.BrandName.options[0].text="==品牌=="; document.Form1.BrandName.options[0].selected =true; } for(i=0;i1) { document.Form1.BrandName.length =1; document.Form1.BrandName.options[0].text="==品牌=="; document.Form1.BrandName.options[0].selected =true; } for(i=0;i