function isPassUrl(remoteLoginUrl){ var flag = false; var passUrlStr = document.getElementById("passUrlStr").value; var urlReg = /[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62}|(:[0-9]{1,4}))+\.?/; var subUrl=urlReg.exec(remoteLog…
js中获取URL中指定的搜索字符串,主要利用location对象实现,废话少说,上代码. function getSearchString(key) { // 获取URL中?之后的字符 var str = location.search; str = str.substring(1,str.length); // 以&分隔字符串,获得类似name=xiaoli这样的元素数组 var arr = str.split("&"); var obj = new Object()…
Example there's an given url: http://localhost:4800/account/login 获取整个url地址: 在页面(cstml)中 Microsoft.AspNetCore.Http.Extensions.UriHelper.GetDisplayUrl(Context.Request); 在 Controller 中 Microsoft.AspNetCore.Http.Extensions.UriHelper.GetDisplayUrl(Reques…