首页 > 技术文章 > 动态截取字符串获取当前网页的URL地址

wolflower 2017-05-22 11:52 原文

 动态截取字符串获取当前网页的URL地址
 
var url = window.location;
                    var urlArr = url.toString().split('/');
                    var ustr = urlArr[4]
if(typeof(ustr) =="undefined")
{
}
else
{
$("#w-down").attr("style","background:url(../../../images/down.png)  center center;)");
                                        $("#w-btn").attr("style","background:url(../../../images/close.png)  no-repeat;) ");
                                        $("#w-top").attr("style","background:url(../../../images/up.png)  no-repeat;)");


}

推荐阅读