<script type="text/javascript">

(function (window,undefined){

    function _$(arguments)
{ } _$.prototype={
constructor:_$,
addEvent:function(){ alert("addEvent");
return this;
},
getStyle:function(){
alert('getStyle');
return this;
}
}
window.$=_$; _$.onReady=function(fn){
window.$=function(){
return new _$(arguments);
} fn(); } })(window) $.onReady(function(){
$("inq").addEvent().getStyle();
}) </script> <script type="text/javascript"> (function (window,undefined){ function _$(arguments)
{ }
Function.prototype.method=function(methodName,fn)
{
this.prototype[methodName]=fn;
return this;
} _$.prototype={
constructor:_$,
addEvent:function(){ alert("addEvent");
return this;
},
getStyle:function(){
alert('getStyle');
return this;
}
}
window.$=_$; _$.onReady=function(fn){
window.$=function(){
return new _$(arguments);
} _$.method('addEvent',function(){
alert("addEvent2");
return this;
}).method('getStyle',function(){
alert("getStyle2");
return this;
});
fn();
} })(window) $.onReady(function(){
$("inq").addEvent().getStyle();
})
//为什么要加_$.method()? 不加也行?
</script>

最新文章

  1. mac上使用imagealpha命令对图片进行压缩批处理
  2. 安装Linux 16.04 时,选择好分区后,进到选择地点的界面后,总是闪退,退到最原始的界面
  3. Unbunt vi 编辑器键盘按键不正确的一次经历与解决方案
  4. NativeScript工作原理
  5. Sql Server建立链接服务器访问Access的MDB数据库
  6. linux内核系列(二)内核数据结构之链表
  7. 判断richtextbox选中的是否为图片
  8. RazorEngine 学习笔记
  9. tomcat 项目部署问题
  10. JavaSE基础篇—数据类型和运算符
  11. CentOS中对ext4文件系统做磁盘配额
  12. iOS XML解析使用-韩国庆
  13. 02Hadoop二次排序2
  14. maven配置文件setting.xml
  15. 前端-关于 Vue 和 React 区别的一些笔记
  16. Java并发编程之final域的内存语义
  17. 谈应用环境下的TIME_WAIT和CLOSE_WAIT[转]
  18. 查看Windows端口及端口关闭方法(转)
  19. Poi读取Excle报错 java.util.zip.ZipException: invalid stored block lengths
  20. sqlserver 文件与文件组的使用和优化

热门文章

  1. 配置RMAN备份环境
  2. perf学习-linux自带性能分析工具
  3. jmeter导入DB数据再再优化
  4. 【BZOJ1001】[BeiJing2006]狼抓兔子
  5. [刷题]算法竞赛入门经典(第2版) 6-6/UVa12166 - Equilibrium Mobile
  6. 全景智慧城市——NOW!!!VRSHOPPING颠覆你的购物认知!
  7. .NET面试题系列[18] - 多线程同步(1)
  8. swift学习 - tableView自适应高度1(xib autoLayout)
  9. java中为什么实体类需要实现序列化
  10. 探讨SQL Server并发处理队列数据不阻塞解决方案