700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > js获取当前路径的简单示例代码【javascript】

js获取当前路径的简单示例代码【javascript】

时间:2023-08-26 06:29:07

相关推荐

js获取当前路径的简单示例代码【javascript】

web前端|js教程

js,获取当前路径

web前端-js教程

thisURL = document.URL;

thisHREF = document.location.href;

thisSLoc = self.location.href;

thisDLoc = document.location;

strwrite = ” thisURL: [” + thisURL + “]

strwrite += ” thisHREF: [” + thisHREF + “]

strwrite += ” thisSLoc: [” + thisSLoc + “]

strwrite += ” thisDLoc: [” + thisDLoc + “]

document.write( strwrite );

thisTLoc = top.location.href;

thisPLoc = parent.document.location;

thisTHost = top.location.hostname;

thisHost = location.hostname;

strwrite = ” thisTLoc: [” + thisTLoc + “]

strwrite += ” thisPLoc: [” + thisPLoc + “]

strwrite += ” thisTHost: [” + thisTHost + “]

strwrite += ” thisHost: [” + thisHost + “]

document.write( strwrite );

tmpHPage = thisHREF.split( “/” );

thisHPage = tmpHPage[ tmpHPage.length-1 ];

tmpUPage = thisURL.split( “/” );

thisUPage = tmpUPage[ tmpUPage.length-1 ];

strwrite = ” thisHPage: [” + thisHPage + “]

strwrite += ” thisUPage: [” + thisUPage + “]

document.write( strwrite );

var url=””;

alert(url)

request.getRequestURI();

request.getRequestURL();

request.getQueryString();

request.getServletPath()

可以得到自己的网络地址:request.getScheme()+”://”+request.getServerName()+”:”+request.getServerPort()+request.getRequestURI()

vb隐藏进程源码下载,vscode空格大小,使用ssh远程连接ubuntu,tomcat异步阻塞,c sqlite传参,js带缩略图的图片轮播插件,前端vue框架与react,爬虫中的js,php as关键字,粤语seo怎么读,直播采集网站源码,网页字体变成波浪状,织梦模板国外网站,css 页面滚轮实现滑动效果,毕业设计工资管理系统程序下载,家居网站程序lzw

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。