码迷,mamicode.com
首页 >  
搜索关键字:function    ( 54714个结果
排序并获取index的顺序
//排序并获取index的顺序:4,7,2,9-->9,7,4,2-->4,2,1,3 Array.prototype.getIndex=function(){ var orderLength = this.length; var temp,tp; ...
分类:编程语言   时间:2014-10-21 13:36:59    阅读次数:160
url解析
window.onload=function(){ var url="http://www.qq.com/index.html?key1=1&key2=2&key3=3"; var json={}; json['query']=url.split('?')[1]; ...
分类:Web程序   时间:2014-10-21 13:34:45    阅读次数:166
微信浏览器内嵌分享功能接口
// 微信分享到朋友圈的内容和图片的定制 (function () { // data for weixin var dataForWeixin = { appId: "", // imgUrl: "", imgWidth: "200", imgHeight: "200"...
分类:微信   时间:2014-10-21 12:31:53    阅读次数:266
Generate Parentheses
[leetcode]Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses....
分类:其他好文   时间:2014-10-21 12:26:59    阅读次数:166
每天一个JavaScript实例-防止重复表单提交
每天一个JavaScript实例-防止重复表单提交 #refresh{ display: none; width:200px; height:20px; background-color: #ff0; } var inprocess = false; window.onload = function(){ document.forms["picker"].ons...
分类:编程语言   时间:2014-10-21 12:18:40    阅读次数:247
js生成GUID
1 function S4() {2 return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);3 }4 function NewGuid() {5 return (S4() + S4() + "-"...
分类:Web程序   时间:2014-10-21 12:09:24    阅读次数:216
随机数和随机字符串的生成
function getRandomNumber(min,max){ var min = Math.floor(min); var max = Math.floor(max); return Math.floor(Math.random()*(max-min)); } function get...
分类:其他好文   时间:2014-10-21 12:03:30    阅读次数:208
Chrome showModalDialog undefined is not a function 的替代方案
Chrome showModalDialog undefined is not a function
分类:其他好文   时间:2014-10-21 11:59:18    阅读次数:593
javascript的函数传参(没有引用传递只有值传递)
var v1 = [] var v2 = {}; var v3 = {}; function foo(v1, v2, v3){ v1 = [1]; v2 = [2]; v3 = {a:3} } foo(v1, v2, v3); alert (v1); // 空白 alert (v...
分类:编程语言   时间:2014-10-21 11:50:10    阅读次数:145
最大公共字串求解的简单易懂的方法
function maxStr(str1,str2){ var arr1=str1.split(""); var arr2=str2.split(""); var maxlen=0; var r1=0; for(var i=0;i<arr1.length;i++){ for(var ...
分类:其他好文   时间:2014-10-21 11:48:10    阅读次数:140
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!