码迷,mamicode.com
首页 >  
搜索关键字:function    ( 54714个结果
lua遍历文件目录
用lua遍历文件目录,收集特定类型的文件: 1 local LINUX = "linux" 2 local WIN = "win" 3 local platform = WIN 4 5 local need_the_filetype = function(tfiletype, filename) ....
分类:其他好文   时间:2014-08-23 19:02:01    阅读次数:630
JQuery实现动态表格
功能实现:点击添加按钮,表格增加一行并给其name属性赋予的值,方便获取点击删除,自动删除这一行JQuery中定义一个count变量 1 var count = 1; 2 function add() { 3 var tbl = document.all.ci; 4 ...
分类:Web程序   时间:2014-08-23 18:53:41    阅读次数:179
jQuery 用each后添加click
mydd = $('.plist');mydd.each(function(i){ $(this).click(function(){ mydl.eq(i).hide("slow"); })});注意:此处 this 指代的是 DOM 对象而非 jQuery 对象。如果...
分类:Web程序   时间:2014-08-23 17:39:11    阅读次数:238
JavaScript 缓存函数测试
! function () { var /* */_a = function (x) { ; x.forEach( function (v) { return v*v }) } , _b = function (x) { ...
分类:编程语言   时间:2014-08-23 15:15:31    阅读次数:191
关于Exception的问题
public function connect($h,$u,$p) { $this->conn = mysql_connect($h,$u,$p); if(!$this->conn) { $err = new Exception('连接失败'); ...
分类:其他好文   时间:2014-08-23 13:50:40    阅读次数:214
compute Binomial Coefficient or combinations with dynamic programming
The ProblemWrite a function that takes two parameters n and k and returns the value of Binomial Coefficient C(n, k).For example, your function should ...
分类:其他好文   时间:2014-08-23 12:41:20    阅读次数:169
Javascript去掉字符串前后空格
Javascript去掉字符串前后空格 function String.prototype.trim(){ return this.toString().replace(/^\s+|\s+$/g,""); } ===================================== =======...
分类:编程语言   时间:2014-08-23 12:32:40    阅读次数:188
Remove Duplicates from Sorted Array II
Follow up for "Remove Duplicates":What if duplicates are allowed at most twice?For example,Given sorted array A = [1,1,1,2,2,3],Your function should r...
分类:其他好文   时间:2014-08-23 11:18:00    阅读次数:167
禁止浏览器backspace键(退格键)时跳转页面(extjs,javascript)
Ext实现方式://方法一var key = new Ext.KeyMap(document,{key: 8,fn: function(obj,e){var type = e.target.type;var readonly = e.target.readOnly;if(type != 'text'...
分类:编程语言   时间:2014-08-23 09:54:50    阅读次数:254
js去掉字符串前后空格的五种方法
第一种:循环检查替换[javascript]//供使用者调用function trim(s){return trimRight(trimLeft(s));}//去掉左边的空白function trimLeft(s){if(s == null) {return "";}var whitespace =...
分类:Web程序   时间:2014-08-23 09:53:20    阅读次数:162
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!