function Search_Url(e) { var oList = document.getElementsByName(e); var bl = ""; for (var i = 0; i < oList.length; i++) { if (oList[i].value != "") { bl = oList[i].value; break; } } if (bl == "") { alert("请输入搜索内容!"); oList[0].focus(); return; } document.forms["form1"].submit(); }