您的位置 首页 > 德语词汇

常见工具称62个,vue中常用60余种工具类

大家好,关于常见工具称62个很多朋友都还不太明白,今天小编就来为大家分享关于vue中常用60余种工具类的知识,希望对各位有所帮助!

exportconstisEmail=(s)=>{\nreturn/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/.test(s)\n}

2.手机号码

常见工具称62个,vue中常用60余种工具类

exportconstisMobile=(s)=>{\nreturn/^1[0-9]{10}$/.test(s)\n}

3.电话号码

exportconstisPhone=(s)=>{\nreturn/^([0-9]{3,4}-)?[0-9]{7,8}$/.test(s)\n}

4.是否url地址

exportconstisURL=(s)=>{\nreturn/^http[s]?:\\/\\/.*/.test(s)\n}

5.是否字符串

exportconstisString=(o)=>{\nreturnObject.prototype.toString.call(o).slice(8,-1)==='String'\n}

6.是否数字

exportconstisNumber=(o)=>{\nreturnObject.prototype.toString.call(o).slice(8,-1)==='Number'\n}

7.是否boolean

exportconstisBoolean=(o)=>{\nreturnObject.prototype.toString.call(o).slice(8,-1)==='Boolean'\n}

8.是否函数

exportconstisFunction=(o)=>{\nreturnObject.prototype.toString.call(o).slice(8,-1)==='Function'\n}

9.是否为null

exportconstisNull=(o)=>{\nreturnObject.prototype.toString.call(o).slice(8,-1)==='Null'\n}

10.是否undefined

exportconstisUndefined=(o)=>{\nreturnObject.prototype.toString.call(o).slice(8,-1)==='Undefined'\n}

11.是否对象

exportconstisObj=(o)=>{\nreturnObject.prototype.toString.call(o).slice(8,-1)==='Object'\n}

12.是否数组

exportconstisArray=(o)=>{\nreturnObject.prototype.toString.call(o).slice(8,-1)==='Array'\n}

13.是否时间

exportconstisDate=(o)=>{\nreturnObject.prototype.toString.call(o).slice(8,-1)==='Date'\n}

14.是否正则

exportconstisRegExp=(o)=>{\nreturnObject.prototype.toString.call(o).slice(8,-1)==='RegExp'\n}

15.是否错误对象

exportconstisError=(o)=>{\nreturnObject.prototype.toString.call(o).slice(8,-1)==='Error'\n}

16.是否Symbol函数

exportconstisSymbol=(o)=>{\nreturnObject.prototype.toString.call(o).slice(8,-1)==='Symbol'\n}

17.是否Promise对象

exportconstisPromise=(o)=>{\nreturnObject.prototype.toString.call(o).slice(8,-1)==='Promise'\n}

18.是否Set对象

exportconstisSet=(o)=>{\nreturnObject.prototype.toString.call(o).slice(8,-1)==='Set'\n}\nexportconstua=navigator.userAgent.toLowerCase();

19.是否是微信浏览器

exportconstisWeiXin=()=>{\nreturnua.match(/microMessenger/i)=='micromessenger'\n}

20.是否是移动端

exportconstisDeviceMobile=()=>{\nreturn/android|webos|iphone|ipod|balckberry/i.test(ua)\n}

21.是否是QQ浏览器

exportconstisQQBrowser=()=>{\nreturn!!ua.match(/mqqbrowser|qzone|qqbrowser|qbwebviewtype/i)\n}

22.是否是爬虫

exportconstisSpider=()=>{\nreturn/adsbot|googlebot|bingbot|msnbot|yandexbot|baidubot|robot|careerbot|seznambot|bot|baiduspider|jikespider|symantecspider|scannerlwebcrawler|crawler|360spider|sosospider|sogouwebsprider|sogouorionspider/.test(ua)\n}

23.是否ios

exportconstisIos=()=>{\nvaru=navigator.userAgent;\nif(u.indexOf('Android')>-1||u.indexOf('Linux')>-1){//安卓手机\nreturnfalse\n}elseif(u.indexOf('iPhone')>-1){//苹果手机\nreturntrue\n}elseif(u.indexOf('iPad')>-1){//iPad\nreturnfalse\n}elseif(u.indexOf('WindowsPhone')>-1){//winphone手机\nreturnfalse\n}else{\nreturnfalse\n}\n}

24.是否为PC端

exportconstisPC=()=>{\nvaruserAgentInfo=navigator.userAgent;\nvarAgents=["Android","iPhone",\n"SymbianOS","WindowsPhone",\n"iPad","iPod"];\nvarflag=true;\nfor(varv=0;v<Agents.length;v++){\nif(userAgentInfo.indexOf(Agents[v])>0){\nflag=false;\nbreak;\n}\n}\nreturnflag;\n}

25.去除html标签

exportconstremoveHtmltag=(str)=>{\nreturnstr.replace(/<[^>]+>/g,'')\n}

26.获取url参数

exportconstgetQueryString=(name)=>{\nconstreg=newRegExp('(^|&)'+name+'=([^&]*)(&|$)','i');\nconstsearch=window.location.search.split('?')[1]||'';\nconstr=search.match(reg)||[];\nreturnr[2];\n}

27.动态引入js

exportconstinjectScript=(src)=>{\nconsts=document.createElement('script');\ns.type='text/javascript';\ns.async=true;\ns.src=src;\nconstt=document.getElementsByTagName('script')[0];\nt.parentNode.insertBefore(s,t);\n}

28.根据url地址下载

exportconstdownload=(url)=>{\nvarisChrome=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;\nvarisSafari=navigator.userAgent.toLowerCase().indexOf('safari')>-1;\nif(isChrome||isSafari){\nvarlink=document.createElement('a');\nlink.href=url;\nif(link.download!==undefined){\nvarfileName=url.substring(url.lastIndexOf('/')+1,url.length);\nlink.download=fileName;\n}\nif(document.createEvent){\nvare=document.createEvent('MouseEvents');\ne.initEvent('click',true,true);\nlink.dispatchEvent(e);\nreturntrue;\n}\n}\nif(url.indexOf('?')===-1){\nurl+='?download';\n}\nwindow.open(url,'_self');\nreturntrue;\n}

29.el是否包含某个class

exportconsthasClass=(el,className)=>{letreg=newRegExp('(^|\\s)'+className+'(\\s|$)')returnreg.test(el.className)}30.el添加某个class

exportconstaddClass=(el,className)=>{\nif(hasClass(el,className)){\nreturn\n}\nletnewClass=el.className.split('')\nnewClass.push(className)\nel.className=newClass.join('')\n}

31.el去除某个class

exportconstremoveClass=(el,className)=>{\nif(!hasClass(el,className)){\nreturn\n}\nletreg=newRegExp('(^|\\\\s)'+className+'(\\\\s|$)','g')\nel.className=el.className.replace(reg,'')\n}

32.获取滚动的坐标

exportconstgetScrollPosition=(el=window)=>({\nx:el.pageXOffset!==undefined?el.pageXOffset:el.scrollLeft,\ny:el.pageYOffset!==undefined?el.pageYOffset:el.scrollTop\n});

33.滚动到顶部

exportconstscrollToTop=()=>{\nconstc=document.documentElement.scrollTop||document.body.scrollTop;\nif(c>0){\nwindow.requestAnimationFrame(scrollToTop);\nwindow.scrollTo(0,c-c/8);\n}\n}

34.el是否在视口范围内

exportconstelementIsVisibleInViewport=(el,partiallyVisible=false)=>{\nconst{top,left,bottom,right}=el.getBoundingClientRect();\nconst{innerHeight,innerWidth}=window;\nreturnpartiallyVisible\n?((top>0&&top<innerHeight)||(bottom>0&&bottom<innerHeight))&&\n((left>0&&left<innerWidth)||(right>0&&right<innerWidth))\n:top>=0&&left>=0&&bottom<=innerHeight&&right<=innerWidth;\n}

35.洗牌算法随机

exportconstshuffle=(arr)=>{\nvarresult=[],\nrandom;\nwhile(arr.length>0){\nrandom=Math.floor(Math.random()*arr.length);\nresult.push(arr[random])\narr.splice(random,1)\n}\nreturnresult;\n}

36.拦截粘贴板

exportconstcopyTextToClipboard=(value)=>{\nvartextArea=document.createElement("textarea");\ntextArea.style.background='transparent';\ntextArea.value=value;\ndocument.body.appendChild(textArea);\ntextArea.select();\ntry{\nvarsuccessful=document.execCommand('copy');\n}catch(err){\nconsole.log('Oops,unabletocopy');\n}\ndocument.body.removeChild(textArea);\n}

37.判断类型集合

exportconstcheckStr=(str,type)=>{\nswitch(type){\ncase'phone'://手机号码\nreturn/^1[3|4|5|6|7|8|9][0-9]{9}$/.test(str);\ncase'tel'://座机\nreturn/^(0\\d{2,3}-\\d{7,8})(-\\d{1,4})?$/.test(str);\ncase'card'://身份证\nreturn/(^\\d{15}$)|(^\\d{18}$)|(^\\d{17}(\\d|X|x)$)/.test(str);\ncase'pwd'://密码以字母开头,长度在6~18之间,只能包含字母、数字和下划线\nreturn/^[a-zA-Z]\\w{5,17}$/.test(str)\ncase'postal'://邮政编码\nreturn/[1-9]\\d{5}(?!\\d)/.test(str);\ncase'QQ'://QQ号\nreturn/^[1-9][0-9]{4,9}$/.test(str);\ncase'email'://邮箱\nreturn/^[\\w-]+(\\.[\\w-]+)*@[\\w-]+(\\.[\\w-]+)+$/.test(str);\ncase'money'://金额(小数点2位)\nreturn/^\\d*(?:\\.\\d{0,2})?$/.test(str);\ncase'URL'://网址\nreturn/(http|ftp|https):\\/\\/[\\w\\-_]+(\\.[\\w\\-_]+)+([\\w\\-\\.,@?^=%&:/~\\+#]*[\\w\\-\\@?^=%&/~\\+#])?/.test(str)\ncase'IP'://IP\nreturn/((?:(?:25[0-5]|2[0-4]\\\\d|[01]?\\\\d?\\\\d)\\\\.){3}(?:25[0-5]|2[0-4]\\\\d|[01]?\\\\d?\\\\d))/.test(str);\ncase'date'://日期时间\nreturn/^(\\d{4})\\-(\\d{2})\\-(\\d{2})(\\d{2})(?:\\:\\d{2}|:(\\d{2}):(\\d{2}))$/.test(str)||/^(\\d{4})\\-(\\d{2})\\-(\\d{2})$/.test(str)\ncase'number'://数字\nreturn/^[0-9]$/.test(str);\ncase'english'://英文\nreturn/^[a-zA-Z]+$/.test(str);\ncase'chinese'://中文\nreturn/^[\\\\u4E00-\\\\u9FA5]+$/.test(str);\ncase'lower'://小写\nreturn/^[a-z]+$/.test(str);\ncase'upper'://大写\nreturn/^[A-Z]+$/.test(str);\ncase'HTML'://HTML标记\nreturn/<("[^"]*"|'[^']*'|[^'">])*>/.test(str);\ndefault:\nreturntrue;\n}\n}

38.严格的身份证校验

exportconstisCardID=(sId)=>{\nif(!/(^\\d{15}$)|(^\\d{17}(\\d|X|x)$)/.test(sId)){\nconsole.log('你输入的身份证长度或格式错误')\nreturnfalse\n}\n//身份证城市\nvaraCity={11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古",21:"辽宁",22:"吉林",23:"黑龙江",31:"上海",32:"江苏",33:"浙江",34:"安徽",35:"福建",36:"江西",37:"山东",41:"河南",42:"湖北",43:"湖南",44:"广东",45:"广西",46:"海南",50:"重庆",51:"四川",52:"贵州",53:"云南",54:"西藏",61:"陕西",62:"甘肃",63:"青海",64:"宁夏",65:"新疆",71:"台湾",81:"香港",82:"澳门",91:"国外"};\nif(!aCity[parseInt(sId.substr(0,2))]){\nconsole.log('你的身份证地区非法')\nreturnfalse\n}\n\n//出生日期验证\nvarsBirthday=(sId.substr(6,4)+"-"+Number(sId.substr(10,2))+"-"+Number(sId.substr(12,2))).replace(/-/g,"/"),\nd=newDate(sBirthday)\nif(sBirthday!=(d.getFullYear()+"/"+(d.getMonth()+1)+"/"+d.getDate())){\nconsole.log('身份证上的出生日期非法')\nreturnfalse\n}\n\n//身份证号码校验\nvarsum=0,\nweights=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2],\ncodes="10X98765432"\nfor(vari=0;i<sId.length-1;i++){\nsum+=sId[i]*weights[i];\n}\nvarlast=codes[sum%11];//计算出来的最后一位身份证号码\nif(sId[sId.length-1]!=last){\nconsole.log('你输入的身份证号非法')\nreturnfalse\n}\n\nreturntrue\n}

39.随机数范围

exportconstrandom=(min,max)=>{\nif(arguments.length===2){\nreturnMath.floor(min+Math.random()*((max+1)-min))\n}else{\nreturnnull;\n}\n}

40.将阿拉伯数字翻译成中文的大写数字

exportconstnumberToChinese=(num)=>{\nvarAA=newArray("零","一","二","三","四","五","六","七","八","九","十");\nvarBB=newArray("","十","百","仟","萬","億","点","");\nvara=(""+num).replace(/(^0*)/g,"").split("."),\nk=0,\nre="";\nfor(vari=a[0].length-1;i>=0;i--){\nswitch(k){\ncase0:\nre=BB[7]+re;\nbreak;\ncase4:\nif(!newRegExp("0{4}//d{"+(a[0].length-i-1)+"}$")\n.test(a[0]))\nre=BB[4]+re;\nbreak;\ncase8:\nre=BB[5]+re;\nBB[7]=BB[5];\nk=0;\nbreak;\n}\nif(k%4==2&&a[0].charAt(i+2)!=0&&a[0].charAt(i+1)==0)\nre=AA[0]+re;\nif(a[0].charAt(i)!=0)\nre=AA[a[0].charAt(i)]+BB[k%4]+re;\nk++;\n}\n\nif(a.length>1)//加上小数部分(如果有小数部分)\n{\nre+=BB[6];\nfor(vari=0;i<a[1].length;i++)\nre+=AA[a[1].charAt(i)];\n}\nif(re=='一十')\nre="十";\nif(re.match(/^一/)&&re.length==3)\nre=re.replace("一","");\nreturnre;\n}

41.将数字转换为大写金额

exportconstchangeToChinese=(Num)=>{\n//判断如果传递进来的不是字符的话转换为字符\nif(typeofNum=="number"){\nNum=newString(Num);\n};\nNum=Num.replace(/,/g,"")//替换tomoney()中的“,”\nNum=Num.replace(//g,"")//替换tomoney()中的空格\nNum=Num.replace(/¥/g,"")//替换掉可能出现的¥字符\nif(isNaN(Num)){//验证输入的字符是否为数字\n//alert("请检查小写金额是否正确");\nreturn"";\n};\n//字符处理完毕后开始转换,采用前后两部分分别转换\nvarpart=String(Num).split(".");\nvarnewchar="";\n//小数点前进行转化\nfor(vari=part[0].length-1;i>=0;i--){\nif(part[0].length>10){\nreturn"";\n//若数量超过拾亿单位,提示\n}\nvartmpnewchar=""\nvarperchar=part[0].charAt(i);\nswitch(perchar){\ncase"0":\ntmpnewchar="零"+tmpnewchar;\nbreak;\ncase"1":\ntmpnewchar="壹"+tmpnewchar;\nbreak;\ncase"2":\ntmpnewchar="贰"+tmpnewchar;\nbreak;\ncase"3":\ntmpnewchar="叁"+tmpnewchar;\nbreak;\ncase"4":\ntmpnewchar="肆"+tmpnewchar;\nbreak;\ncase"5":\ntmpnewchar="伍"+tmpnewchar;\nbreak;\ncase"6":\ntmpnewchar="陆"+tmpnewchar;\nbreak;\ncase"7":\ntmpnewchar="柒"+tmpnewchar;\nbreak;\ncase"8":\ntmpnewchar="捌"+tmpnewchar;\nbreak;\ncase"9":\ntmpnewchar="玖"+tmpnewchar;\nbreak;\n}\nswitch(part[0].length-i-1){\ncase0:\ntmpnewchar=tmpnewchar+"元";\nbreak;\ncase1:\nif(perchar!=0)tmpnewchar=tmpnewchar+"拾";\nbreak;\ncase2:\nif(perchar!=0)tmpnewchar=tmpnewchar+"佰";\nbreak;\ncase3:\nif(perchar!=0)tmpnewchar=tmpnewchar+"仟";\nbreak;\ncase4:\ntmpnewchar=tmpnewchar+"万";\nbreak;\ncase5:\nif(perchar!=0)tmpnewchar=tmpnewchar+"拾";\nbreak;\ncase6:\nif(perchar!=0)tmpnewchar=tmpnewchar+"佰";\nbreak;\ncase7:\nif(perchar!=0)tmpnewchar=tmpnewchar+"仟";\nbreak;\ncase8:\ntmpnewchar=tmpnewchar+"亿";\nbreak;\ncase9:\ntmpnewchar=tmpnewchar+"拾";\nbreak;\n}\nvarnewchar=tmpnewchar+newchar;\n}\n//小数点之后进行转化\nif(Num.indexOf(".")!=-1){\nif(part[1].length>2){\n//alert("小数点之后只能保留两位,系统将自动截断");\npart[1]=part[1].substr(0,2)\n}\nfor(i=0;i<part[1].length;i++){\ntmpnewchar=""\nperchar=part[1].charAt(i)\nswitch(perchar){\ncase"0":\ntmpnewchar="零"+tmpnewchar;\nbreak;\ncase"1":\ntmpnewchar="壹"+tmpnewchar;\nbreak;\ncase"2":\ntmpnewchar="贰"+tmpnewchar;\nbreak;\ncase"3":\ntmpnewchar="叁"+tmpnewchar;\nbreak;\ncase"4":\ntmpnewchar="肆"+tmpnewchar;\nbreak;\ncase"5":\ntmpnewchar="伍"+tmpnewchar;\nbreak;\ncase"6":\ntmpnewchar="陆"+tmpnewchar;\nbreak;\ncase"7":\ntmpnewchar="柒"+tmpnewchar;\nbreak;\ncase"8":\ntmpnewchar="捌"+tmpnewchar;\nbreak;\ncase"9":\ntmpnewchar="玖"+tmpnewchar;\nbreak;\n}\nif(i==0)tmpnewchar=tmpnewchar+"角";\nif(i==1)tmpnewchar=tmpnewchar+"分";\nnewchar=newchar+tmpnewchar;\n}\n}\n//替换所有无用汉字\nwhile(newchar.search("零零")!=-1)\nnewchar=newchar.replace("零零","零");\nnewchar=newchar.replace("零亿","亿");\nnewchar=newchar.replace("亿万","亿");\nnewchar=newchar.replace("零万","万");\nnewchar=newchar.replace("零元","元");\nnewchar=newchar.replace("零角","");\nnewchar=newchar.replace("零分","");\nif(newchar.charAt(newchar.length-1)=="元"){\nnewchar=newchar+"整"\n}\nreturnnewchar;\n}

42.判断一个元素是否在数组中

exportconstcontains=(arr,val)=>{\nreturnarr.indexOf(val)!=-1?true:false;\n}

43.数组排序,{type}1:从小到大2:从大到小3:随机

exportconstsort=(arr,type=1)=>{\nreturnarr.sort((a,b)=>{\nswitch(type){\ncase1:\nreturna-b;\ncase2:\nreturnb-a;\ncase3:\nreturnMath.random()-0.5;\ndefault:\nreturnarr;\n}\n})\n}

44.去重

exportconstunique=(arr)=>{\nif(Array.hasOwnProperty('from')){\nreturnArray.from(newSet(arr));\n}else{\nvarn={},r=[];\nfor(vari=0;i<arr.length;i++){\nif(!n[arr[i]]){\nn[arr[i]]=true;\nr.push(arr[i]);\n}\n}\nreturnr;\n}\n}

45.求两个集合的并集

exportconstunion=(a,b)=>{\nvarnewArr=a.concat(b);\nreturnthis.unique(newArr);\n}

46.求两个集合的交集

exportconstintersect=(a,b)=>{\nvar_this=this;\na=this.unique(a);\nreturnthis.map(a,function(o){\nreturn_this.contains(b,o)?o:null;\n});\n}

47.删除其中一个元素

exportconstremove=(arr,ele)=>{\nvarindex=arr.indexOf(ele);\nif(index>-1){\narr.splice(index,1);\n}\nreturnarr;\n}

48.将类数组转换为数组``exportconstformArray=(ary)=>{vararr=[];if(Array.isArray(ary)){arr=ary;}else{arr=Array.prototype.slice.call(ary);};returnarr;}

49.最大值\n

exportconstmax=(arr)=>{returnMath.max.apply(null,arr);}

50.最小值\n

exportconstmin=(arr)=>{returnMath.min.apply(null,arr);}

51.求和\n

exportconstsum=(arr)=>{returnarr.reduce((pre,cur)=>{returnpre+cur})}

52.平均值\n

exportconstaverage=(arr)=>{returnthis.sum(arr)/arr.length}

53.去除空格,type:1-所有空格2-前后空格3-前空格4-后空格\n

exportconsttrim=(str,type)=>{type=type||1switch(type){case1:returnstr.replace(/\\s+/g,"");case2:returnstr.replace(/(^\\s)|(\\s)/g,"");default:returnstr;}}

54.字符转换,type:1:首字母大写2:首字母小写3:大小写转换4:全部大写5:全部小写\n

exportconstchangeCase=(str,type)=>{type=type||4switch(type){case1:returnstr.replace(/\\b\\w+\\b/g,function(word){returnword.substring(0,1).toUpperCase()+word.substring(1).toLowerCase();

});\ncase2:\nreturnstr.replace(/\\b\\w+\\b/g,function(word){\nreturnword.substring(0,1).toLowerCase()+word.substring(1).toUpperCase();\n});\ncase3:\nreturnstr.split('').map(function(word){\nif(/[a-z]/.test(word)){\nreturnword.toUpperCase();\n}else{\nreturnword.toLowerCase()\n}\n}).join('')\ncase4:\nreturnstr.toUpperCase();\ncase5:\nreturnstr.toLowerCase();\ndefault:\nreturnstr;\n}

}

55.检测密码强度\n

exportconstcheckPwd=(str)=>{varLv=0;if(str.length<6){returnLv}if(/[0-9]/.test(str)){Lv++}if(/[a-z]/.test(str)){Lv++}if(/[A-Z]/.test(str)){Lv++}if(/[.|-|_]/.test(str)){Lv++}returnLv;}

56.函数节流器\n

exportconstdebouncer=(fn,time,interval=200)=>{if(time-(window.debounceTimestamp||0)>interval){fn&&fn();window.debounceTimestamp=time;}}

57.在字符串中插入新字符串\n

exportconstinsertStr=(soure,index,newStr)=>{varstr=soure.slice(0,index)+newStr+soure.slice(index);returnstr;}

58.判断两个对象是否键值相同\n

exportconstisObjectEqual=(a,b)=>{varaProps=Object.getOwnPropertyNames(a);varbProps=Object.getOwnPropertyNames(b);

if(aProps.length!==bProps.length){\nreturnfalse;\n}\n\nfor(vari=0;i<aProps.length;i++){\nvarpropName=aProps[i];\n\nif(a[propName]!==b[propName]){\nreturnfalse;\n}\n}\nreturntrue;

}

59.16进制颜色转RGBRGBA字符串\n

exportconstcolorToRGB=(val,opa)=>{

varpattern=/^(#?)[a-fA-F0-9]{6}$/;//16进制颜色值校验规则\nvarisOpa=typeofopa=='number';//判断是否有设置不透明度\n\nif(!pattern.test(val)){//如果值不符合规则返回空字符\nreturn'';\n}\n\nvarv=val.replace(/#/,'');//如果有#号先去除#号\nvarrgbArr=[];\nvarrgbStr='';\n\nfor(vari=0;i<3;i++){\nvaritem=v.substring(i*2,i*2+2);\nvarnum=parseInt(item,16);\nrgbArr.push(num);\n}\n\nrgbStr=rgbArr.join();\nrgbStr='rgb'+(isOpa?'a':'')+'('+rgbStr+(isOpa?','+opa:'')+')';\nreturnrgbStr;

}

60.追加url参数\n

exportconstappendQuery=(url,key,value)=>{varoptions=key;if(typeofoptions=='string'){options={};options[key]=value;}options=$.param(options);if(url.includes('?')){url+='&'+options}else{url+='?'+options}returnurl;}

OK,本文到此结束,希望对大家有所帮助。

本站涵盖的内容、图片、视频等数据,部分未能与原作者取得联系。若涉及版权问题,请及时通知我们并提供相关证明材料,我们将及时予以删除!谢谢大家的理解与支持!

Copyright © 2023