appleid 2019-06-30
var _e = new Event('input') document.getElementsByTagName('input')[4].value = '张' document.getElementsByTagName('input')[4].dispatchEvent(_e)
window.addEventListener('message', function(rs){ console.log(rs); if (rs.origin === 'https://test.auto0917.com') { } }); var iframe = document.createElement("iframe"); document.querySelector("body").appendChild(iframe); iframe.setAttribute("src","https://test.auto0917.com/test.html");
注意子页面发送消息时会有同源策略问题,所有必须用top.postMessage,不能用parant.pos
window.top.postMessage('hahah', 'https://appleid.apple.com/account#!&page=create')