phpcms v9站内外搜索代码分享

phpcms v9 站内外搜索代码

复制代码

代码如下:

<form name=”search_form1″ target=”_blank” onsubmit=”return go(this)”>
<input name=”q” id=”q” size=”30″ value=”请输入关键字” onMouseOver=”this.focus()” onBlur=”if (value ==”){value=’请输入关键字’}” onFocus=”this.select()” onClick=”if(this.value==’请输入关键字’)this.value=””>
<INPUT name=”word” type=”hidden” value=0>
<INPUT name=”myselectvalue” type=”hidden” value=0>
<INPUT name=”tn” type=”hidden” value=”sayyes”>
<INPUT name=”cl” type=”hidden” value=”3″>
<input type=”hidden” name=”m” value=”search”/>
<input type=”hidden” name=”c” value=”index”/>
<input type=”hidden” name=”a” value=”init”/>
<input type=”hidden” name=”typeid” value=”1″/>
<input type=”hidden” name=”siteid” value=”1″/>
<INPUT CHECKED name=”myselect” onclick=javascript:this.form.myselectvalue.value=0; type=radio value=0>
<FONT color=#0000cc style=”FONT-SIZE: 12px”>互联网</FONT>
<INPUT name=”myselect” onclick=javascript:this.form.myselectvalue.value=1; type=radio value=1>
<FONT color=#ff0000 style=”FONT-SIZE: 12px”>站内</FONT>
<input type=”submit” value=”搜索”>
</form>
<SCRIPT language=javascript>
<!–
function go(formname)
{
var url = “http://www.baidu.com/baidu”;
formname.method = “get“;
if (formname.myselectvalue.value == “1”) {
url=”{APP_PATH}index.php”;
}
document.search_form1.word.value = document.search_form1.q.value;
formname.action = url;
return true;
}
//–>
</SCRIPT>
文章链接:,本站部分内容来自互联网,如不慎侵害的您的权益,请告知,我们将尽快删除!

发表评论