因为写的时候用的let 参考
var msIe = false; var ua = window.navigator.userAgent; var old_ie = ua.indexOf('MSIE '); var new_ie = ua.indexOf('Trident/'); if ((old_ie > -1) || (new_ie > -1)) { msIe = true; } // ie浏览器引用js文件 if ( msIe ) { document.getElementById("polyfillSrc").src = "https://cdn.polyfill.io/v2/polyfill.min.js"; }