yuchav

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\');

}

);});

分类:

技术点:

相关文章:

  • 2021-10-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
猜你喜欢
  • 2022-12-23
  • 2021-12-03
  • 2021-07-29
  • 2021-05-22
相关资源
相似解决方案