function GetQueryString(name){ var reg=eval("/"+name+"/g"); var r = window.location.search.substr(1); var flag=reg.test(r); if(flag){ return true; }else{ return false; } } GetQueryString("night");
axios的配置项地址参考: https://www.npmjs.com/package/axios { // `url` is the server URL that will be used for the request url: '/user', // `method` is the request method to be used when making the request method: 'get', // default // `baseURL` will be prepen
一.Js中获取地址栏参数 //从地址栏获取想要的参数 function GetQueryString(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); var r = window.location.search.substr(1).match(reg); if (r != null) return unescape(r[2]); return null; } va
[抄题]: Given two strings A and B, find the minimum number of times A has to be repeated such that B is a substring of it. If no such solution, return -1. For example, with A = "abcd" and B = "cdabcdab". Return 3, because by repeating A