dede织梦搜索框制作方法合集

2017-04-13 21:02:32 dedecms

<form method="post" action="{dede:global.cfg_basehost/}/plus/search.php" name="formsearch" class="search"> <input type="hidden" value="www.wangjinhai119.com" name="domains"><input type="hidden" value="0" name="kwtype"> <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="65"> </td> <td width="146" valign="middle"><input class="keywords" name="q" type="text" id="search" value="请输入搜索内容..."> <input type="hidden" value="titlekeyword" name="searchtype" ></td> <td width="5"> </td> <td> <button type="submit" class="submit"></button> </td> </tr> </table> </form>

<form method="post" action="{dede:global.cfg_basehost/}/plus/search.php" name="formsearch" class="search"> <input type="hidden" value="www.wangjinhai119.com" name="domains"><input type="hidden" value="0" name="kwtype"> <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="65">&nbsp;</td> <td width="146" valign="middle"> <input class="keywords" name="q" type="text" id="search" value="请输入搜索内容..." onFocus="if(this.value=='请输入搜索内容...') {this.value='';}" onBlur="if(this.value==''){this.value='请输入搜索内容...';}"> <input type="hidden" value="titlekeyword" name="searchtype" > </td> <td width="5">&nbsp;</td> <td> <button type="submit" class="submit"></button> </td> </tr> </table> </form>

如果需要将“搜索按钮”修改为图片,则使用“<input type="image" src="images/index_ss.jpg" />”即可