| 1 | <!DOCTYPE html> |
|---|
| 2 | <html> |
|---|
| 3 | <head> |
|---|
| 4 | <title>Replace Textarea by Code — CKEditor Sample</title> |
|---|
| 5 | <meta charset="utf-8"> |
|---|
| 6 | <script type="text/javascript"> |
|---|
| 7 | window.document.domain='example.com'; |
|---|
| 8 | </script> |
|---|
| 9 | </head> |
|---|
| 10 | <body> |
|---|
| 11 | <div> |
|---|
| 12 | <iframe id="a1" width="100px" height="100px" src=""></iframe> |
|---|
| 13 | </div> |
|---|
| 14 | <div> |
|---|
| 15 | <iframe id="a2" width="100px" height="100px" src=""></iframe> |
|---|
| 16 | </div> |
|---|
| 17 | <script> |
|---|
| 18 | var src = 'javascript:(function(){document.open();document.domain="' + document.domain + '";document.close();})()'; |
|---|
| 19 | document.getElementById('a2').src=src; |
|---|
| 20 | window.setTimeout(function(){document.getElementById('a1').contentWindow.document.write('<p>Hello</p>');}, 1500); |
|---|
| 21 | window.setTimeout(function(){document.getElementById('a2').contentWindow.document.write('<p>Hello</p>');}, 2500); |
|---|
| 22 | </script> |
|---|
| 23 | </body> |
|---|
| 24 | </html> |
|---|