在Header中有一個搜索輸入框
將焦點停在“資訊標題或內容”輸入框中
原因
/* 回車後執行按鈕 */
function SubmitKeyClick(button){
if (event
event
event
document
}
}
function checkinputbox(){
var charBag = "[^`~@#$%^&/’|*]";
var searchkey = document
if (trim(searchkey
alert("資訊文章關鍵字不能都為空或長度不能超過個字符!");
searchkey
return false;
}
if (trim(searchkey
for (var i =
var c = searchkey
if (charBag
alert("搜索資訊文章關鍵字字符串中含有非法字符(" + c +")!");
searchkey
return false;
}
}
}
}
<input id="txtSearchKey" name="txtSearchKey" type="text" runat="server" maxlength="
this
this
在Header的cs中
this
From:http://tw.wingwit.com/Article/program/net/201311/14443.html