HTML <div id="main"></div>
JS var TestClass = function() {};
TestClass.prototype = {
addElement: function(parentId) {
var parent = document.querySelector('#' + parentId);
var a = doc
我从本文档中看到:https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage,将数据正确传递给iframe的方式。但现在我想发送一个答案: //from main page
myIframe.contentWindow.postMessage('send me a response', '*');
//from ifr
// Quote Data
const data = {
quotes: [{
id: 1,
"author": "Shakespeare",
"source": "Julius Caesar",
"quote": "Cowards die many times before their deaths. The valiant never tas