<script> $(resetFields); //相当于addLoadEvent(resetFields);会弹出1111 function resetFields(){
alert(111); } </script>
resetFields函数
<script> $(resetFields); function resetFields(){ $(‘form input[placeholder]‘).focus(function(){ var input = $(this); if(input.val() == input.attr(‘placeholder‘)){ input.val(‘ ‘); } }).blur(function(){ var input = $(this); if(input.val() ==‘‘){ var placeholder = input.attr(‘placeholder‘); input.val(placeholder); } }).blur(); } </script>