码迷,mamicode.com
首页 >  
搜索关键字:FN    ( 3217个结果
JavaScript下的setTimeout(fn,0)意味着什么?
原文:JavaScript下的setTimeout(fn,0)意味着什么? 近期在研究异步编程的我对于setTimeout之类的东西异常敏感。在SegmentFault上看到了一个问题《关于SetTimeout时间设为0时》:提问者读了一篇文章,原文解释setTimeout延迟时间为0时会发生的事情...
分类:编程语言   时间:2015-03-13 12:33:10    阅读次数:257
js寄生函数
// 寄生函数 function obj(o){ function Fn(){}; Fn.prototype = o; // 把指针转回给自己 return new Fn(); } function create(o,oBj){ var _o = obj(o.prototype); _o.constructor = oBj; oBj.prototype = _o; return...
分类:Web程序   时间:2015-03-11 23:32:17    阅读次数:306
Jquery插件----TextArea高度自适应
textArea的高度自适应本来应该很简单的,只需要用js监听它的输入然后修改其高度即可,甚至对于ie只要用css(overflow:visible;)控制就可以了。但是同样会有兼容性问题,用一个jQuery插件来实现。代码如下: $.fn.extend({ textareaAutoHeight: ...
分类:Web程序   时间:2015-03-11 17:02:09    阅读次数:156
textarea 高度自适应
jQuery.fn.extend({ autoHeight: function(){ return this.each(function(){ var $this = jQuery(this); if( !$this.attr('_initAdjustHeight') ){ $this.attr('...
分类:其他好文   时间:2015-03-11 16:54:39    阅读次数:139
Jquery插件----TextArea高度自适应
TextArea的高度自适应本来应该很简单的,只需要用js监听它的输入然后修改其高度即可,甚至对于ie只要用css(overflow:visible;)控制就可以了。但是同样会有兼容性问题,用jQuery插件来实现。代码如下: $.fn.extend({ textareaAutoHeight: fu...
分类:Web程序   时间:2015-03-11 16:46:23    阅读次数:147
jquery 那些事儿~
var $$ = ajQuery = function(selector) { return new ajQuery.fn.init(selector);}ajQuery.fn = ajQuery.prototype = { name: 'aaron', init: functio...
分类:Web程序   时间:2015-03-10 18:47:13    阅读次数:143
textarea 高度自适应
1 jQuery.fn.extend({ 2 autoHeight: function(){ 3 return this.each(function(){ 4 var $this = jQuery(th...
分类:其他好文   时间:2015-03-10 18:43:16    阅读次数:113
textarea 高度自适应
1 jQuery.fn.extend({ 2 autoHeight: function(){ 3 return this.each(function(){ 4 var $this = jQuery(th...
分类:其他好文   时间:2015-03-10 17:11:08    阅读次数:138
Linux定时器 使用
1.alarmalarm()执行后,进程将继续执行,在后期(alarm以后)的执行过程中将会在seconds秒后收到信号SIGALRM并执行其处理函数。#include #include #include void sigalrm_fn(int sig){ printf("alarm!\n"); a...
分类:系统相关   时间:2015-03-09 20:42:08    阅读次数:280
[JQuery]分页插件PageList
虽然已经有了[JQuery]分页插件jQuery pager plugin功能扩展,可惜蛋疼的UI不一样,只能重做一个,唉 基本上与pager类似,只不过跳转方式有所变化,以下是具体的js,其中defaultSettings为相关参数设定,其中要注意的是renderPerCall,这个参数如果设为false,将不执行html重绘 $.fn.pageList = function (arg,...
分类:Web程序   时间:2015-03-09 19:09:04    阅读次数:886
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!