jquery extend 方法
来源:互联网 发布:php 字符串转义 编辑:程序博客网 时间:2024/05/17 02:06
1.扩展jQuery静态方法
$.extend({test:function(){alert('test函数')}})
用法: $.test()
2.合并多个对象.
//用法: jQuery.extend(obj1,obj2,obj3,..)var Css1={size: "10px",style: "oblique"}var Css2={size: "12px",style: "oblique",weight: "bolder"}$.jQuery.extend(Css1,Css2)//结果:Css1的size属性被覆盖,而且继承了Css2的weight属性// Css1 = {size: "12px",style: "oblique",weight: "bolder"}
3.深度镶套对象
// 以前的 .extend() jQuery.extend( { name: “John”, location: { city: “Boston” } }, { last: “Resig”, location: { state: “MA” } } ); // 结果: // => { name: “John”, last: “Resig”, location: { state: “MA” } } // 新的更深入的 .extend() jQuery.extend( true, { name: “John”, location: { city: “Boston” } }, { last: “Resig”, location: { state: “MA” } } ); // 结果 // => { name: “John”, last: “Resig”, // location: { city: “Boston”, state: “MA” } }
- jQuery中的extend方法
- Jquery的$.extend方法
- jquery extend 方法
- jQuery extend 扩展方法
- jQuery中的extend方法
- jQuery.extend()方法
- jQuery的extend方法
- jquery.extend() 方法详解
- jQuery.extend()方法
- Jquery的extend方法$.extend()学习
- jQuery.extend()方法和jQuery.fn.extend()方法源码分析
- JQuery的extend扩展方法
- JQuery的extend扩展方法
- jquery的extend方法详解
- JQuery的extend方法详解
- JQuery的extend方法详解
- JQuery的extend扩展方法
- jQuery 的 extend 扩展方法
- web页面内容优化管理与性能技巧
- 御膳房只给做中午的
- DW常见问题
- 如何用JavaScript隐藏一个超级链接真实的地址?
- 设计中的道理_4
- jquery extend 方法
- UVa 11300 - Spreading the Wealth
- 我们的工作到底是为了什么?
- Hibernate与 MyBatis的比较
- 在大学,这就是巨大的差距
- android之SQLite数据库insert操作
- CyclicBarrier 和CountDownLatch使用详解
- 常用算法(Algorithm)的用法介绍
- STM32 IAP 设计实例 (一)