码迷,mamicode.com
首页 >  
搜索关键字:function    ( 54714个结果
一个通用onReady函数的实现
define([], function(){ function onReady(fn) { var DOC = document, html = DOC.documentElement, W3C = document.dispatchEvent; //FF以前是没有readyState属性的 //判断body是否存在来决定DOM文档是否加载完毕 if...
分类:其他好文   时间:2014-08-29 00:08:26    阅读次数:264
【ExtJS】FormPanel表单验证
在Extjs中,FormPane表单提供了各种各样的验证。在表单验证前需要在onReady的function({})内添加以下代码:Ext.QuickTips.init(); //为组件提供提示信息功能,form的主要提示信息就是客户端验证的错误信息。出现错误提醒有两种方法...
分类:Web程序   时间:2014-08-29 00:06:56    阅读次数:327
highchat中的category编程object问题
设置highchart时的category时我是动态赋值的形式category=cat;cat是['title','title']是X轴的坐标显示但当单击chat的图例时X轴变成了object;解决通过jQuery的$(function(){})把赋值的变量通过其包裹一下达到与chart一同加载的就...
分类:其他好文   时间:2014-08-29 00:03:09    阅读次数:231
LeetCode: Same Tree
LeetCode: Same TreeGiven two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are struct...
分类:其他好文   时间:2014-08-28 22:40:46    阅读次数:266
【cocos2d-x3.2游戏开发】 lua 类, 继承, 面向对象
lua没有面向对象一说,cocos为我们准备了class的lua端函数,我们参考quick的class函数 --[[-- 创建一个类 ~~~ lua -- 定义名为 Shape 的基础类 local Shape = class("Shape") -- ctor() 是类的构造函数,在调用 Shape.new() 创建 Shape 对象实例时会自动执行 function Shape:cto...
分类:其他好文   时间:2014-08-28 18:12:55    阅读次数:383
JS判断是否为数字,是否为整数,是否为浮点数
1、JS判断是否为数字,是否为整数,是否为浮点数 正则表达式方法function checkRate(input){ var re = /^[0-9]+.?[0-9]*$/; //判断字符串是否为数字 //判断正整数 /^[1-9]+[0-9]*]*$/ if (!re.test(input.ra....
分类:Web程序   时间:2014-08-28 18:01:15    阅读次数:231
出现Deprecated: Function ereg_replace() is deprecated in 的原因及解决方法
在 php5.3环境下运行oscommerce,常常会出现Deprecated: Function ereg() is deprecated in...和Deprecated: Function ereg_replace() is deprecated in...这些类型的报错提示。 其原因在于:....
分类:其他好文   时间:2014-08-28 17:54:25    阅读次数:174
jQuery插件:用于获取元素自身的HTML内容
jQuery.fn.outerHTML = function(s) { return (s) ? this.before(s).remove() : $("").append(this.eq(0).clone()).html(); }
分类:Web程序   时间:2014-08-28 17:51:45    阅读次数:189
函数中的$input
$input 在此属于一个特殊变量,一般在函数中用于接收输入1 function FindWindowsFolder 2 { 3 $input | where-object {$_.Name -eq "Windows"} 4 }5 6 ls -path c:\ | FindWindowsFolder...
分类:其他好文   时间:2014-08-28 17:45:45    阅读次数:189
【leetcode】Longest Common Prefix
题目: Write a function to find the longest common prefix string amongst an array of strings. 解析:求字符串数组中所有数组的最长公共前缀,重点考察细节和边界条件,比如: [] :输入字符串数组为空,要判断if (strs .size() == 0) ...
分类:其他好文   时间:2014-08-28 17:02:31    阅读次数:253
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!