搜索框的写法
Html写法: <form id="search" class="search" >
<input type="text" id="search_box" class="search_box" value="search MSDN resources..." onfocus="if(this.value='search MSDN resources...')this.value=''" onblur="this.value='search MSDN resources...'"/>
<input type="button" name="search_btn" id="search_btn" class="search_btn" value=""/>
</form>
Jquery写法://搜索框
$('#search_box').click(function(){$(this).val('')}).focus(function(){$(this).addClass('focus').blur(
function(){
$(this).val('search MSDN resources...').removeClass('focus');
}
);});