通过动态插入的方式,能让脚本执行,直接放进去没法执行
var ifr = document.createElement('iframe');
ifr.id = 'uiui'
document.body.append(ifr)
var ifrBody = document.getElementById('uiui').contentDocument.body;
var script = document.getElementById('uiui').contentDocument.createElement('script');
script.innerHTML = `
var p = document.createElement('p');
p.innerHTML = 'o_o'
document.body.appendChild(p);
`;
document.getElementById('uiui').contentDocument.body.appendChild(script);