Remove the problem of displaying URL in the pop-up box in iOS system

    //Remove the address bar displayed by the alert pop-up window on ios
    window.alert = function(name){
        var iframe = document.createElement("IFRAME");
        iframe.style.display="none";
        iframe.setAttribute("src", 'data:text/plain,');
        document.documentElement.appendChild(iframe);
        window.frames[0].window.alert(name);
        iframe.parentNode.removeChild(iframe);
    }

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326854988&siteId=291194637