js原型问题:什么是js原型?js每声明一个function,都有prototype原型,prototype原型是函数的一个默认属性,在函数的创建过程中由js编译器自动添加。也就是说:当生产一个function对象的时候,就可以看到它了。举个栗子:prototype的属性值是一个对象,是属性的集合,...
分类:
编程语言 时间:
2015-10-30 18:54:44
阅读次数:
239
基本语法如下:function functionName(arg0,arg1,...,argN){ statements}1. 理解参数 ECMAScript中的参数在内部是用一个数组来表示的,在函数体内可通过arguments对象来访问这个参数数组。 其实,arguments对象只是与数组类...
分类:
编程语言 时间:
2015-10-30 18:42:14
阅读次数:
194
*** 写文件* @param string $file 文件路径* @param string $str 写入内容* @param char $mode 写入模式*/function writeFile($file,$str,$mode='w'){ $oldmask = @umask(0); $f...
分类:
Web程序 时间:
2015-10-30 18:42:06
阅读次数:
166
首先添加作业队列方法function SubmitTaskList() { var obj = {}; var taskList = []; var index = 0; obj.AddTask = function (task) { if (task) taskList.push(task); }...
分类:
其他好文 时间:
2015-10-30 18:37:12
阅读次数:
116
当代码如下: function myClear() { $("#add_form").form("reset"); $("#add_dialog").dialog("open"); }在浏览器上会出现:请输入必填项的提示。但是如果如下则不会出现 function myClear()...
分类:
其他好文 时间:
2015-10-30 15:24:39
阅读次数:
184
var me=require('./myModule.js');me.hello("mei");模块myModule.jsthis.hello=function(name){ console.log("hello"+name);}//或写成// function hello(name){// ...
分类:
Web程序 时间:
2015-10-30 14:12:06
阅读次数:
147
什么是柯里化柯里化允许我们把函数与传递给它的参数结合,产生一个新的函数。[引自《JavaScript语言精髓》,第43页 柯里化]A function is said to be curried when not all arguments have been supplied to the fun...
分类:
编程语言 时间:
2015-10-30 14:05:57
阅读次数:
178
String Function包括lr_advance_param指向参数文件中参数的下一个值。lr_convert_string_encoding将字符串转换为其他编码。lr_decrypt解密加密后的字符串。lr_eval_string更新argument的内嵌parameter值后,返回字符串...
分类:
其他好文 时间:
2015-10-30 14:00:45
阅读次数:
183
!function()?{
????function?setFontsize()?{
????????document.documentElement.style.fontSize?=?document.documentElement.clientWidth?/?16?+?"px";
????}
????var?_t?=?nul...
分类:
移动开发 时间:
2015-10-30 12:50:39
阅读次数:
216
/**
?*?过滤为3字节内utf8
?*?@param?$str
?*?@return?string
?*/
function?filterUtf8($str)
{
????/*utf8?编码表:
????*?Unicode符号范围???????????|?UTF-8编码方式
????...
分类:
其他好文 时间:
2015-10-30 12:45:22
阅读次数:
215