<!doctype html> | |
<html> | |
<body> | |
<script> | |
var iframeElement = document.createElement('iframe'); | |
url = window.location.href; | |
iframeElement.src = url.substr(url.indexOf('=') + 1); | |
document.body.appendChild(iframeElement); | |
function runTest() { | |
iframeElement.contentWindow.postMessage('', '*'); | |
} | |
window.addEventListener('message', function (evt) { | |
document.title = evt.data; | |
}, false); | |
</script> | |
</body> | |
</html> |