织梦DEDECMS搜索提交用a便签替换button标签方法

我们用织梦建站时,织梦默认搜索提交标签是button,有时候我们不要botton样式,就用a便签来替换。

原理是:在a便签里加个onclick属性,在前面form里加入id='search_form',直接上一个案例代码,就知道怎么来套用了

<form name="formsearch" action="/plus/search.php" id='search_form'>
<div class="searchform">
<input type="hidden" name="kwtype" value="0">
<input name="q" type="text" class="input" id="search-keyword" value="在这里搜索..." onfocus="if(this.value=='在这里搜索...'){this.value='';}" onblur="if(this.value==''){this.value='在这里搜索...';}" x-webkit-speech="">
</div>
<div class="search_submit">
<a onclick="document.getElementById('search_form').submit();"><img src="/style/picture/search_btn.jpg" alt="Products Search"></a>
</div>
</form>

免责声明:本站所有文章和图片均来自用户分享和网络收集,文章和图片版权归原作者及原出处所有,仅供学习与参考,请勿用于商业用途,如果损害了您的权利,请联系网站客服处理。

声明:本站所有文章,如无特殊说明或标注,均为爬虫抓取以及网友投稿,版权归原作者所有。
0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧