导航:首页 > 万维百科 > 网页设计加入搜索栏

网页设计加入搜索栏

发布时间: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">

与网页设计加入搜索栏相关的知识