函数定义和调用 定义函数,在JavaScript中,定义函数的方式如下: function abs(x){ if(x >=0){ return x; }else{ return -x; } } 上述abs() 函数的定义如下: function 指出这是一个函数定义; abs 是函数的名称; (x) ...
分类:
编程语言 时间:
2016-05-18 12:12:56
阅读次数:
193
scroll事件:滚动元素时或者是使用scroll()方法会触发scroll事件 scroll()方法 触发选中元素的scroll事件 $(selector).scroll()//无参数 规定scroll事件被触发后的函数 $(selector).scroll( function ) functio ...
分类:
Web程序 时间:
2016-05-18 12:12:40
阅读次数:
263
转载原出处: http://blog.csdn.net/honantic/article/details/46331875 匿名函数 匿名函数(Anonymous Function)是表示“内联”方法定义的表达式。匿名函数本身及其内部没有值或者类型,但是可以转换为兼容的委托或者表达式树类型(了解详情 ...
/**
*Getthereboundcallbacksforagiventype.
*
*@paramstring$abstract
*@returnarray
*/
protectedfunctiongetReboundCallbacks($abstract)
{
if(isset($this->reboundCallbacks[$abstract])){//ifhasthevalueinthereboundcallbacksarray
return$this->reboundCallbacks..
分类:
其他好文 时间:
2016-05-18 10:59:28
阅读次数:
179
一、获取href的参数 String.prototype.GetValue = function (parm) { var reg = new RegExp("(^|&)" + parm + "=([^&]*)(&|$)"); var r = this.substr(this.indexOf("\? ...
分类:
其他好文 时间:
2016-05-18 10:47:37
阅读次数:
154
function Copy() { //step 1 查询当前信息 var new_code = Xrm.Page.getAttribute("new_code").getValue();//促销编号 var new_name = Xrm.Page.getAttribute("new_name"). ...
分类:
其他好文 时间:
2016-05-18 10:43:57
阅读次数:
305
如果忘记将变量声明为局部变量,该变量将会隐式地转变为全局变量 function swap(a,i,j){ temp=a[i]; a[i]=a[j]; a[j]=temp; } 尽管该程序没有使用var声明temp变量,执行不会出错,而且temp会被添加到全局使用域中,变成一个全局变量。 修正过的代码 ...
分类:
编程语言 时间:
2016-05-18 10:29:58
阅读次数:
161
1, /include/configs/smdk2440.h 中添加 #define CONFIG_CMD_NAND 编译 drivers/mtd/nand/built-in.o: In function `nand_init_chip': /u-boot-2016.03/drivers/mtd/n ...
分类:
其他好文 时间:
2016-05-18 10:26:57
阅读次数:
165
网络请求: 1 /** 2 * 发起HTTPS请求 3 */ 4 function curl_post($url,$data=null,$header=null,$post=0) 5 { 6 //初始化curl 7 $ch = curl_init(); 8 //参数设置 9 $res= curl_s ...
分类:
Web程序 时间:
2016-05-18 10:25:11
阅读次数:
174
Use the library indexedDB-promised. Create a database and stroe: Notice put() function take value frist then key. Read the key in stroe: Write value t ...
分类:
数据库 时间:
2016-05-18 06:50:19
阅读次数:
220