導航:首頁 > 萬維百科 > 網頁設計加入搜索欄

網頁設計加入搜索欄

發布時間:2020-11-05 11:21:18

1、在網頁上加入搜索欄的代碼

http://www.baidu.com/search/freecode.html
這是地址:裡面有 下面也列出代碼了
一:<form action="http://www.baidu.com/baidu" target="_blank">
<table bgcolor="#FFFFFF"><tr><td>
<input name=tn type=hidden value=baidu>
<a href="http://www.baidu.com/"><img src="https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/logo-80px.gif" alt="Bai" align="bottom" border="0"></a>
<input type=text name=word size=30>
<input type="submit" value="百度搜索">
</td></tr></table>
</form>

<SCRIPT language=javascript>
function gowhere1(formname)
{
var url;
if (formname.myselectvalue.value == "0")
{
url = "http://www.baidu.com/baidu";
document.search_form1.tn.value = "baidu";
formname.method = "get";
}
if (formname.myselectvalue.value == "1")
{
url = "http://mp3.baidu.com/m";
document.search_form1.tn.value = "baidump3";
document.search_form1.ct.value = "134217728";
document.search_form1.lm.value = "-1";
}

if (formname.myselectvalue.value == "4")
{
document.search_form1.tn.value = "news";
document.search_form1.cl.value = "2";
document.search_form1.rn.value = "20";
url = "http://news.baidu.com/ns";
}
if (formname.myselectvalue.value == "5")
{
document.search_form1.tn.value = "baiduiamge";
document.search_form1.ct.value = "201326592";
document.search_form1.cl.value = "2";
document.search_form1.lm.value = "-1";
url = "http://image.baidu.com/i";
}
if (formname.myselectvalue.value == "6")
{
url = "http://post.baidu.com/f";
document.search_form1.tn.value = "baiduPostSearch";
document.search_form1.ct.value = "352321536";
document.search_form1.rn.value = "10";
document.search_form1.lm.value = "65536";
}

formname.action = url;
return true;
}
</SCRIPT>
<form name="search_form1" target="_blank" onsubmit="return gowhere1(this)">
<table width="460" height="60" border="0" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0" style=font-family:宋體><tr><td>
<TABLE width="460" height="80" border=0 cellPadding=0 cellSpacing=0>
<INPUT name=myselectvalue type=hidden value=0>
<INPUT name=tn type=hidden>
<INPUT name=ct type=hidden>
<INPUT name=lm type=hidden>
<INPUT name=cl type=hidden>
<INPUT name=rn type=hidden>
<TR>
<TD width="8%" valign="bottom">
<DIV align=center><a href="http://www.baidu.com/"><img src="https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/logo-80px.gif"
alt="Bai" align="bottom" border="0"></a></DIV></TD>
<TD vAlign=bottom width="92%">
<INPUT name=myselect onclick=javascript:this.form.myselectvalue.value=4; type=radio value=0>
<FONT color=#0000cc style="FONT-SIZE: 12px">新聞</FONT>

<INPUT CHECKED name=myselect onclick=javascript:this.form.myselectvalue.value=0; type=radio value=0>
<SPAN class=f12><FONT color=#0000cc style="FONT-SIZE: 12px">網頁</FONT></SPAN>
<INPUT name=myselect onclick=javascript:this.form.myselectvalue.value=1; type=radio value=1>
<SPAN class=f12><FONT color=#0000cc style="FONT-SIZE: 12px">mp3</FONT></SPAN>
<INPUT name=myselect onclick=javascript:this.form.myselectvalue.value=6; type=radio value=0>
<FONT color=#0000cc style="FONT-SIZE: 12px">貼吧</FONT>
<INPUT name=myselect onclick=javascript:this.form.myselectvalue.value=5; type=radio value=0>
<FONT color=#0000cc style="FONT-SIZE: 12px">圖片</FONT>

<TABLE align=right border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD><FONT style="FONT-SIZE: 12px">
<input id=word name=word size="40">
</FONT> <input type="submit" value="百度搜索"> </TD></TR>

</form>

<SCRIPT language=javascript>
function g(formname) {
var url = "http://www.baidu.com/baidu";
if (formname.s[1].checked) {
formname.ct.value = "2097152";
}
else {
formname.ct.value = "0";
}
formname.action = url;
return true;
}
</SCRIPT>
<form name="f1" onsubmit="return g(this)">
<table bgcolor="#FFFFFF" style="font-size:9pt;">
<tr height="60"><td valign="top"><img src="https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/logo-137px.gif" border="0" alt="baidu"></td>
<td>
<input name=word size="30" maxlength="100">
<input type="submit" value="百度搜索"><br>
<input name=tn type=hidden value="bds">
<input name=cl type=hidden value="3">
<input name=ct type=hidden>
<input name=si type=hidden value="www.guoxue.com">
<input name=s type=radio> 互聯網
<input name=s type=radio checked> www.guoxue.com
</td></tr></table>
</form>

2、dreamweaver網頁製作如何加入搜索框,搜索框功能是可以搜索自已製作的網頁中的內容,能做出來嗎?謝謝

可以製作搜索框,但是如果要實現實際的搜索功能可能就需要用到後台的內容了。僅僅依靠網頁製作,應該是實現不了這個功能的。

3、如何在自己做的網頁中添加百度搜索欄?急!

我給你幾種代碼,你試試,看哪種好。

1、
<iframe id="baiduframe" marginwidth="0" marginheight="0" scrolling="no"
framespacing="0" vspace="0" hspace="0" frameborder="0" width="400" height="90"
src="http://unstat.baidu.com/bn.bsc?tn=hekai_pg&cv=0&cid=1133937&csid=242&bgcr=ffffff&ftcr=000000&urlcr=0000ff&tbsz=335&sropls=1,2,3,4,5,6&kwgp=0">
</iframe>

2、
<iframe id="baiduframe" marginwidth="0" marginheight="0" scrolling="no"
framespacing="0" vspace="0" hspace="0" frameborder="0" width="140" height="75"
src="http://unstat.baidu.com/bn.bsc?tn=hekai_pg&cv=0&cid=1133937&csid=105&bgcr=ffffff&ftcr=000000&urlcr=0000ff&tbsz=80">
</iframe>

3、
<iframe id="baiduframe" marginwidth="0" marginheight="0" scrolling="no"
framespacing="0" vspace="0" hspace="0" frameborder="0" width="200" height="30"
src="http://unstat.baidu.com/bn.bsc?tn=hekai_pg&cv=0&cid=1133937&csid=102&bgcr=ffffff&ftcr=000000&urlcr=0000ff&tbsz=80">
</iframe>

4、
<iframe id="baiduframe" marginwidth="0" marginheight="0" scrolling="no"
framespacing="0" vspace="0" hspace="0" frameborder="0" width="468" height="60"
src="http://unstat.baidu.com/bn.bsc?tn=hekai_pg&cv=0&cid=1133937&csid=106&bgcr=ffffff&ftcr=000000&urlcr=0000ff&tbsz=230&sropls=1,2,3,4,5,6,7,9,10&kwgp=0">
</iframe>

這些是最常用的,你可以試試,就知道是怎麼樣的了,其實沒什麼詳細的解釋。這是框架代碼。

補充:這就是完整的代碼,是百度提供的多種樣式中的4種。現在百度搜索代碼就是框架的形式,所以說這就是完整代碼。

4、用DW製作網頁時怎樣在頁面中加入搜索欄

1、新建一個asp頁面,保存為「sousuojieguo.asp」。

2、打開之前製作過的"jiluji.asp「。

3、把滑鼠指針放在表格的最左邊,按回車鍵,把滑鼠指針往上移,然後點擊菜單欄的:插入-->表單-->表單,插入一個表單。

4、在表單里邊輸入」搜索:「,然後點擊菜單欄:插入-->表單-->文本域,插入一個文本框。

5、滑鼠點擊剛剛插入的文本框,然後在下方把id改成"sousuo"。

6、然後把滑鼠放到文本框的後邊,插入一個按鈕,並把按鈕上的顯示文字改成"搜索「,切換到剛剛新建的」sousuojiesuo.asp「頁面,打開」綁定「面板,點擊」+「,選擇」記錄集(查詢)「。

7、在彈出的界面如圖所示設置:篩選設置成:xingming-包含-表單變數-sousuo。

8、把滑鼠放到搜索結果頁面上輸入「搜索結果:「,然後回車,在點擊菜單欄:插入-->表格。插入一個2行4列的表格。

9、 然後在表格第一行一次輸入如圖所示文字。

10、然後把綁定面板中剛剛新建的記錄集依次拖入表格第二行對應的位置。 


11、把滑鼠指針放到第二行的任意位置,然後點擊界面下方的<tr>標簽,選中第二行。

12、打開」伺服器行為「面板,點擊」+「,選擇」重復區域「。

13、在彈出的界面中選擇」所有記錄「,然後點擊」確定「。

14、切換到」jiluji.asp",把滑鼠指針放到搜索框所在表單中,點擊界面下方的<form#form1>,選中整個表單。

15、在屬性面板中點擊動作方框右邊的「文件夾」按鈕,在彈出的界面中選擇」sousuojieguo.asp「。選擇完成後,下方的方法選擇"post"。

16、保存所有文件,然後按F12就可以在瀏覽器中瀏覽效果了。

5、如何在自己做的網頁中添加搜索欄

1.網路搜索代碼 (468*50):

<iframe id="網路frame" border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0"
framespacing="0" frameborder="0" scrolling="no" width="468" height="50"
src="http://unstat.網路.com/bn.bsc?tn=cn88net_pg&cv=1&cid=1023960&csid=101&rkcs=16&bgcr=FFFFFF&ftcr=0000CC&rk=1&bd=1&tbsz=&tbst=&bdas=0">
</iframe>

2.網路搜索代碼(200*30):

<iframe id="網路frame" border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0"
framespacing="0" frameborder="0" scrolling="no" width="200" height="30"
src="http://unstat.網路.com/bn.bsc?tn=cn88net_pg&cv=1&cid=1023960&csid=102&rkcs=16&bgcr=FFFFFF&ftcr=0000CC&rk=1&bd=1&tbsz=&tbst=&bdas=0">
</iframe>

3.網路搜索代碼(670*40)

<iframe id="網路frame" border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0"
framespacing="0" frameborder="0" scrolling="no" width="670" height="40"
src="http://unstat.網路.com/bn.bsc?tn=cn88net_pg&cv=1&cid=1023960&csid=103&rkcs=16&bgcr=FFFFFF&ftcr=0000CC&rk=1&bd=1&tbsz=&tbst=&bdas=0">
</iframe>

4.網路搜索代碼(410*80)

<iframe id="網路frame" border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0"
framespacing="0" frameborder="0" scrolling="no" width="410" height="80"
src="http://unstat.網路.com/bn.bsc?tn=cn88net_pg&cv=1&cid=1023960&csid=104&rkcs=16&bgcr=FFFFFF&ftcr=0000CC&rk=1&bd=1&tbsz=&tbst=&bdas=0">
</iframe>

5.網路搜索代碼(140*75)

<iframe id="網路frame" border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0"
framespacing="0" frameborder="0" scrolling="no" width="140" height="75"
src="http://unstat.網路.com/bn.bsc?tn=cn88net_pg&cv=1&cid=1023960&csid=105&rkcs=16&bgcr=FFFFFF&ftcr=0000CC&rk=1&bd=1&tbsz=&tbst=&bdas=0">
</iframe>

6.網路搜索代碼(468*60)

<iframe id="網路frame" border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0"
framespacing="0" frameborder="0" scrolling="no" width="468" height="60"
src="http://unstat.網路.com/bn.bsc?tn=cn88net_pg&cv=1&cid=1023960&csid=106&rkcs=16&bgcr=FFFFFF&ftcr=0000CC&rk=1&bd=1&tbsz=&tbst=&bdas=0">
</iframe>

7.網路搜索代碼(468*40)

<iframe id="網路frame" border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0"
framespacing="0" frameborder="0" scrolling="no" width="468" height="40"
src="http://unstat.網路.com/bn.bsc?tn=cn88net_pg&cv=1&cid=1023960&csid=107&rkcs=16&bgcr=FFFFFF&ftcr=0000CC&rk=1&bd=1&tbsz=&tbst=&bdas=0">
</iframe>

8.網路搜索代碼(400*40)

<iframe id="網路frame" border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0"
framespacing="0" frameborder="0" scrolling="no" width="400" height="40"
src="http://unstat.網路.com/bn.bsc?tn=cn88net_pg&cv=1&cid=1023960&csid=108&rkcs=16&bgcr=FFFFFF&ftcr=0000CC&rk=1&bd=1&tbsz=&tbst=&bdas=0">
</iframe>

9.網路搜索代碼(360*45)

<iframe id="網路frame" border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0"
framespacing="0" frameborder="0" scrolling="no" width="360" height="45"
src="http://unstat.網路.com/bn.bsc?tn=cn88net_pg&cv=1&cid=1023960&csid=221&rkcs=16&bgcr=FFFFFF&ftcr=0000CC&rk=1&bd=1&tbsz=&tbst=&bdas=0">
</iframe>

10.網路搜索代碼(360*55)

<iframe id="網路frame" border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0"
framespacing="0" frameborder="0" scrolling="no" width="360" height="55"
src="http://unstat.網路.com/bn.bsc?tn=cn88net_pg&cv=1&cid=1023960&csid=222&rkcs=16&bgcr=FFFFFF&ftcr=0000CC&rk=1&bd=1&tbsz=&tbst=&bdas=0">
</iframe>

11.網路搜索代碼(760*45)

<iframe id="網路frame" border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0"
framespacing="0" frameborder="0" scrolling="no" width="760" height="45"
src="http://unstat.網路.com/bn.bsc?tn=cn88net_pg&cv=1&cid=1023960&csid=227&rkcs=16&bgcr=FFFFFF&ftcr=0000CC&rk=1&bd=1&tbsz=&tbst=&bdas=0">
</iframe>

12.網路搜索代碼(600*45)

<iframe id="網路frame" border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0"
framespacing="0" frameborder="0" scrolling="no" width="600" height="45"
src="http://unstat.網路.com/bn.bsc?tn=cn88net_pg&cv=1&cid=1023960&csid=225&rkcs=16&bgcr=FFFFFF&ftcr=0000CC&rk=1&bd=1&tbsz=&tbst=&bdas=0">
</iframe>

13.網路搜索代碼(562*57)

<iframe id="網路frame" border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0"
framespacing="0" frameborder="0" scrolling="no" width="562" height="57"
src="http://unstat.網路.com/bn.bsc?tn=cn88net_pg&cv=1&cid=1023960&csid=223&rkcs=16&bgcr=FFFFFF&ftcr=0000CC&rk=1&bd=1&tbsz=&tbst=&bdas=0">
</iframe>

14.網路搜索代碼(594*55)

<iframe id="網路frame" border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0"
framespacing="0" frameborder="0" scrolling="no" width="594" height="55"
src="http://unstat.網路.com/bn.bsc?tn=cn88net_pg&cv=1&cid=1023960&csid=224&rkcs=16&bgcr=FFFFFF&ftcr=0000CC&rk=1&bd=1&tbsz=&tbst=&bdas=0">
</iframe>

15.網路搜索代碼(760*30)

<iframe id="網路frame" border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0"
framespacing="0" frameborder="0" scrolling="no" width="760" height="30"
src="http://unstat.網路.com/bn.bsc?tn=cn88net_pg&cv=1&cid=1023960&csid=226&rkcs=16&bgcr=FFFFFF&ftcr=0000CC&rk=1&bd=1&tbsz=&tbst=&bdas=0">
</iframe>

6、如何在網頁設計中添加搜索引擎

你是指做個輸入框然後點按鈕後跳轉成別的搜索引擎(例如百度)的的呢還是在自己站內搜索

7、在網頁製作中,怎麼在主頁上加上百度的搜索欄,請高手指點?

http://www.網路.com/search/freecode.html

它這裡面有詳細的
可是我用了半天用這個搜索引擎也
搜索不專到我的網站屬

如果你想站內搜索
還是用 搜索引擎工廠 這個軟體比較好

8、網頁設計中如何做一個好看的搜索框

通過from表單,將查詢的關鍵詞,通過 like 跟數據進行模糊查詢對比
從topics表中查詢欄位subject與傳進來的參數'$_POST['topic']進行比較模糊查詢
設subject欄位數據為:數學,英語,物理,化學,英文
$subject=$_POST['topic'];
$sql = "select * from topics where subject like '%" .$subject. "%'";
$result = mysql_query($sql);
若從表單提交的『topic』值為「學」,得到的結果將是:數學,化學
多個欄位匹配查詢:
$sql = "select id,subject from topics where (id like '%" .$id. "%') or (name like '%" .$name. "%') or (subject like '%" .$subject. "%') order by id desc";

9、html用代碼加入圖中的搜索欄

j簡單一點的:回答
<div id='' style="width:300px;">
<input style="float:left ;width:220px;"/>
<input type="button" style="float:right" value="search"/>
</div>

10、html中搜索框怎麼做?

<input type="text" class="aa"><input type="button" value="搜索" class="bb">

與網頁設計加入搜索欄相關的知識