html5搜索框美化,CSS美化的漂亮搜索框
生活随笔
收集整理的這篇文章主要介紹了
html5搜索框美化,CSS美化的漂亮搜索框
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
CSS美化的漂亮搜索框
我要搜索
搜索
var $ = function(id){return document.getElementById(id);}
var formSubmit = function(id){
document.forms[id].submit();
return false;
}
var tip = function(q, for_q){
q = $(q);
for_q = $(for_q);
q.onfocus = function(){
for_q.style.display = 'none';
q.style.backgroundPosition = "right -17px";
}
q.onblur = function(){
if(!this.value) for_q.style.display = 'block';
q.style.backgroundPosition = "right 0";
}
for_q.onclick = function(){
this.style.display = 'none';
q.focus();
}
};
tip('keyword','for-keyword');
總結
以上是生活随笔為你收集整理的html5搜索框美化,CSS美化的漂亮搜索框的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 在家里能看到影院效果的电影吗?
- 下一篇: android contentresol