模拟placeholder

var $needArea=$('.need-area');
    var placeholder = '说明:
 1:新业务:请纤细业务生产背景,为什么要做?
 2:老业务或体验优化:请描述线上存在问题,目前影响的范畴等';
     $needArea.attr('value', placeholder);
     $needArea.focus(function(){
          if($(this).val() === placeholder){
              $(this).val('');
          }
      });
     $needArea.blur(function(){
         if($(this).val() === ''){
             $(this).val(placeholder);
         }    
    });
原文地址:https://www.cnblogs.com/xiaozhumaopao/p/7155047.html