zoukankan      html  css  js  c++  java
  • defaultValue属性包含表单元素的初始值

     1     <script type="text/javascript">
     2         $(function(){
     3             $('input[type="text"]').focus(function(){
     4               $(this).val('');
     5             }).blur(function(){
     6               $(this).val(this.defaultValue);    
     7             });
     8             /*$('input[type="text"]').focus(function(){
     9             $(this).val('');
    10             });
    11             $('#address').blur(function(){
    12             $(this).val($addressTxt);    
    13             });
    14             $('#password').blur(function(){
    15             $(this).val($passwordTxt);    
    16             });*/
    17         });
    18     </script>
  • 相关阅读:
    协程
    多进程
    多线程
    模块进阶
    内建函数
    内建属性
    属性property
    私有化
    深拷贝、浅拷贝
    ==、is
  • 原文地址:https://www.cnblogs.com/vscss/p/5537616.html
Copyright © 2011-2022 走看看