zoukankan      html  css  js  c++  java
  • $.fn

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
    <script type="text/javascript" src="../jquery-1.9.0.min.js"></script>
    
    <script type="text/javascript">
    
    /**
      $.fn 是指JQuery的命名空间
     
      $.fx 是指动画特效
      
      扩展JQuery开发
      $.extend()  为类添加新的方法
      $.fn.extend() 为对象添加新的方法
      
      
     */
    
    $(function(){
        $('#table').newtable({
            id:'table',
            url:'www.baidu.com'
        });
        
    });
    
    $.fn.newtable = function(p){
        var param = $.extend({},{},{});
        var v =  $(this).attr("id");
        alert(v);
        
        var id = param[0];
    }
    
    </script>
    
    </head>
    <body>
    <div id ='table'></div> 
    </body>
    </html>
  • 相关阅读:
    Title
    Title
    Title
    Title
    Title
    Title
    Title
    Title
    Title
    git 的使用
  • 原文地址:https://www.cnblogs.com/lxh520/p/9111810.html
Copyright © 2011-2022 走看看