form??id="searchform"?name="searchform"?method="post"?action="/e/search/index.php"?target="_blank"??????
成都創(chuàng)新互聯(lián)公司主要從事成都做網(wǎng)站、成都網(wǎng)站制作、成都外貿(mào)網(wǎng)站建設、網(wǎng)頁設計、企業(yè)做網(wǎng)站、公司建網(wǎng)站等業(yè)務。立足成都服務崖州,10余年網(wǎng)站建設經(jīng)驗,價格優(yōu)惠、服務專業(yè),歡迎來電咨詢建站服務:18982081108
input?style="float:left;"?class="main?text"?maxlength="70"??size="42"?type="text"?name="keyboard"?id="keyboard"?value=""?/????
input?type="hidden"?name="show"?value="title,smalltext"?/????
input?type="hidden"?name="tempid"?value="1"?/????
input?style="float:left;"??type="image"?value="?搜?索?"?src="/images/img/searchbutton.jpg"?//form
上面代碼是搜索標題和簡介的,你說的全站搜索,只能搜索標題和簡介,內(nèi)容是無法參與搜索的
!doctype html
html
head
meta charset="UTF-8"
titleUntitled Document/title
/head
body
script
function CheckSearchForm(){
? ? if(document.getElementById("searchform").stitle.value=="")
? ? {
? ? ? ? ? ? alert("請輸入標題");
? ? ? ? ? ? return false;
? ? }
? ? if(document.getElementById("searchform").swriter.value=="")
? ? {
? ? ? ? ? ? alert("請輸入作者");
? ? ? ? ? ? return false;
? ? }
? ? return true;
}
/script
form name="searchform" id="searchform" method="post" action="/e/search/index.php" onsubmit="return CheckSearchForm();"
table width="550" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder"
input type="hidden" name="tbname" value="zhengshu"
input type="hidden" name="tempid" value="1"
input type="hidden" name="andor" value="and"
tr class="header"
? td colspan="2"新聞搜索/td
/tr
tr bgcolor="#FFFFFF"
? td width="97"姓名:/td
? td width="388"
? ? ? input type="hidden" name="show[]" value="title"
? ? ? input type="hidden" name="hh[]" value="LK"
? ? ? input name="keyboard[]" type="text" id="stitle"
? /td
/tr
tr bgcolor="#FFFFFF"
? td編號:/td
? td
? ? ? input type="hidden" name="show[]" value="xingming"
? ? ? input type="hidden" name="hh[]" value="LK"
? ? ? input name="keyboard[]" type="text" id="swriter"
? /td
/tr
? ? tr bgcolor="#FFFFFF"
? td /td
? td
? ? input type="submit" name="Submit" value="馬上搜索"
? ? font color="#666666"(不設置為不限)/font
? /td
/tr
/table
/form
/body
/html
form?action='/e/search/index.php'?method="post"?name="search_news"?id="search_news"
input?type="hidden"?name="show"?value="title"?style="display:none;"?/
input?name="keyboard"?type="text"?class="search-keyword"?id="keyboard"?value="在這里搜索..."?onfocus="if(this.value=='在這里搜索...'){this.value='';}"??onblur="if(this.value==''){this.value='在這里搜索...';}"?/
input?type="submit"?name="Submit22"?value=""?class="s_sumbit"/
/form
你把上面的form放到相應的位置即可。這就是帝國cms的搜索。
當前文章:帝國cms多字段搜索 帝國cms搜索代碼
文章路徑:http://bm7419.com/article38/ddejpsp.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供響應式網(wǎng)站、電子商務、營銷型網(wǎng)站建設、動態(tài)網(wǎng)站、標簽優(yōu)化、做網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)