文能深情寻萝莉,武能仗义护人妻[问题描述]Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return ...
分类:
其他好文 时间:
2014-08-13 14:51:56
阅读次数:
228
一、jQuery.Cookie.js插件是一个轻量级的Cookie管理插件。 特别提醒,今日发现一个特别的错误,google浏览器提示:has no method $.cookie。火狐浏览器提示:$.cookie is not a function;调试了半天,终于找到原因,如果同一个页面两次或....
分类:
Web程序 时间:
2014-08-13 14:42:36
阅读次数:
225
1.递归算法a.function box(num){if(num<=1){ return 1;}else{ return num*box(num-1);}}alert(box(5));b.函数内部调用它本身 ,可以用arguments.callee替代它函数名box;这样可以一旦改变其名字,里边的就...
分类:
Web程序 时间:
2014-08-13 14:41:16
阅读次数:
212
1、show()显示效果 语法:show(speed,callback) Number/String,Function speend为动画执行时间,单位为毫秒。也可以为slow","normal","fast" callback可选,为当动画完成时执行的函数。 show(speed,[e...
分类:
Web程序 时间:
2014-08-13 14:30:56
阅读次数:
271
在微信中,分享网页到朋友或朋友圈时,微信会自动获取该网页的图片和标题,但是有时候我们需要自己定义分享的图片和标题的话,就需要调用微信的接口来实现,weixin_share.js地址:调用方法 $(document).ready(function () { wx_share_hand...
分类:
微信 时间:
2014-08-13 12:56:06
阅读次数:
417
function printView() { var newWin = window.open('printer', '', ''); var titleHTML = document.getElementById("printdiv").innerHTML; newWin.document.wri...
分类:
其他好文 时间:
2014-08-13 12:53:36
阅读次数:
210
注:此文均来自网上,可行,只供参考//JAVASCRIPT中 日期相减很麻烦 ,现在有现成的实现方法,拷贝过去就可以用了,方便//调用该方法(主方法)function dateDiff(date1, date2){ var type1 = typeof date1, type2 = typeof d...
分类:
Web程序 时间:
2014-08-13 12:47:36
阅读次数:
246
Function funcReturn valueabsAbsolute value of the argument arg (绝对值)signPlus/minus sign of the argument arg: -1, if the value of arg is negative; 0 if...
分类:
其他好文 时间:
2014-08-13 12:39:56
阅读次数:
204
register_shutdown_function — Register a function for execution on shutdown。 ps:Registers acallbackto be executed after script execution finishes or...
分类:
其他好文 时间:
2014-08-13 12:32:46
阅读次数:
185
原文:浅谈 js eval作用域
就简单聊下如何全局 eval 一个代码。 var x = 1;
(function () { eval('var x = 123;');
})();
console.log(x); 这个代码得到的是 1 而不是 123如果想让 eval 执行的代码是全局的,那么有几...
分类:
Web程序 时间:
2014-08-13 12:26:56
阅读次数:
224