输入框的文字显示效果

$(function(){
    $("input[name='search']").focus(function(){
        $(this).val("");
    })
    $("input[name='search']").blur(function(){
        $(this).val("请输入搜索文字");
    })
})

原文地址:https://www.cnblogs.com/rain92/p/5519956.html