IE title changes to if the page has a url with '#' , and has flash/swf embedded in it

后端 未结 5 795

The issue is, if IE (6.0+) , has flash content embedded in it, and the url of the page has a # somewhere in it, then when the flash content loads ,or if the user interacts with

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-31 10:39

    //some changes
    if (browser.ie < 10) {
        document.attachEvent('onpropertychange', function(evt) {
            if (evt.propertyName === 'title' && document.title) {
                setTimeout(function() {
                    var b=document.title.indexOf('#');
                    if(b!==-1){
                        document.title = document.title.slice(0,b);
                    }
    
                }, 1);
            }
        });
    }
    

提交回复
热议问题