Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- var w = window.open('http://studiothorn.com/recive.html');
- w.postMessage('anand.', 'http://studiothorn.com');
- w.postMessage('aff.', 'http://studiothorn.com');
- function receiveMessage(event)
- {
- alert("hello");
- if (event.origin !== "http://studiothorn.com")
- return;
- }
- window.addEventListener("message", receiveMessage, false);
- </script>
- and secondly code is about reciver
- function receiveMessage(event)
- {
- alert("aff");
- if (event.origin !== "http://studiothorn.com")
- return;
- event.source.postMessage("hi there yourself! the secret response " +"is:
- rheeeeet!",event.origin);
- }
- window.addEventListener("message", receiveMessage, false);
- . in second code is about reciving text send by the sender.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement