码迷,mamicode.com
首页 >  
搜索关键字:function    ( 54714个结果
山寨优酷频道首页的图片效果
效果: 1 require('effect', function(S) { 2 var now=3,total = S('img').size(); 3 S('#bottom_nav div').on('click',function(){ 4 var r...
分类:其他好文   时间:2014-10-16 03:43:31    阅读次数:192
leetcode第14题--Longest Common Prefix
Problems:Write a function to find the longest common prefix string amongst an array of strings.就是返回一个字符串数组的所有的公共前缀。不难。我是已第一个字符串为参考,然后依次遍历其他的字符串,一旦遇到不同...
分类:其他好文   时间:2014-10-16 02:35:11    阅读次数:215
LeetCode Generate Parentheses
Givennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution set is:"((()))...
分类:其他好文   时间:2014-10-16 01:27:21    阅读次数:272
JavaScript解析机制
JavaScript是一种解释型语言,按照 1 7 示例4:先预声明变量,再预声明函数,因此,预编译阶段variableA函数覆盖了variableA变量。在执行阶段,variableA变量被赋值为2,1 alert(variableA); //function variableA(){alert....
分类:编程语言   时间:2014-10-16 01:21:01    阅读次数:189
转换为大写金额
var DM = { /** * 金额大写转换函数 */ cnyNumber4CN: function(n) { n = DM.unfmtAmt(n); if("" == n){ ...
分类:其他好文   时间:2014-10-16 01:06:11    阅读次数:390
jquery如何实现domReady和onload判断的
function ready(fn) { var completed = function() { if ( document.addEventListener ) { document.removeEventListener( "DOMContentLoa...
分类:Web程序   时间:2014-10-16 00:35:11    阅读次数:343
R语言在Linux环境下安装Curl出错问题的解决
运行 install.packages("RCurl") 得到这样的结果 > I have some problem in running R-cran‘s Demography package. > The hmd.mx function need Rcurl. I tried to install RCurl, but meet the following error...
分类:编程语言   时间:2014-10-15 23:11:42    阅读次数:328
Javascript 匿名函数与闭包
请见如下一个闭包示例:color = "red";var obj = { color: "blue", getColor: function () { function displayColor() { return this.color; ...
分类:编程语言   时间:2014-10-15 23:03:41    阅读次数:333
Javascript 闭包的理解
示例1:function makeCounter() { var i = 0; console.log( ++i );}var counter = makeCounter(); // 输出: 1counter(); //TypeError: undefined is not a fun...
分类:编程语言   时间:2014-10-15 21:56:01    阅读次数:222
JavaScript DOM编程 学习笔记
<!doctypehtml> <htmllang="en"> <head> <metacharset="UTF-8"> <title>Document</title> <scripttype="text/javascript"> //整个HTML文档加载完成之后出发window.onload事件,事件出发后执行function函数体 window.onload=functi..
分类:编程语言   时间:2014-10-15 21:51:02    阅读次数:188
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!