欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

location.origin兼容IE

程序员文章站 2022-07-05 15:18:50
if (window["context"] == undefined) { if (!window.location.origin) { window.location.origin = window.location.protocol + "//" + window.location.hostna... ......
if (window["context"] == undefined) {
    if (!window.location.origin) {
        window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');
    }
    window["context"] = location.origin+"/v6.0";
}



 if (!window.location.origin) {
        window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');
 }