<script> function search() { var a=$("#search").val(); url = "/plus/search.php?q=" + a ; location.href = url; } </script> <input type="text" id="search" class="inputbox" value="请输入您要搜索的信息"/> <input type="button" class="btn_search" value="搜索" onclick="search()" /> |
<script type="text/javascript"> onload = function () { var txt = document.querySelector ("input[type=text]"); txt.onfocus = function () { this.place = this.value; this.value = ""; }; txt.onblur = function () { this.value = this.place; } } </script> |
转载请注明:DEDEcms» DEDE js搜索代码
标签: