文本框获得焦点与失去焦点

$(function(){
        $("input:text").focus(function(){
              if($(this).val() ==this.defaultValue){   
                  $(this).val("");            
              }  
        }).blur(function(){
             if ($(this).val() == '') {
                $(this).val(this.defaultValue);
             }
        });
    });

PS:

IE10下背景颜色渐变:

background:-ms-linear-gradient(top, #3db4ff, #0098d8);

原文地址:https://www.cnblogs.com/nancy0324/p/3088298.html