HTML and CSS Reference
In-Depth Information
If these two lines are added to your hosts file, then browsing to either http:// or will direct a request
to a web server running on your local machine.
To experiment with cross-domain messaging, you'll need two files. The
first, the parent page, contains an <iframe> element that will load the
second child page:
<iframe width="600px"
height="200px" src="child-1.html">
<textarea id="message">
This is a message in
the parent frame
This page also contains a <button>
that will initiate communication
with the child:
<button onclick="update_child()">
Update child
The update_child() function attempts to directly edit the contents of the
child page:
function update_child() {
var el = document
var tb = el.contentDocument
tb.value = 'Updated from parent';
Search WWH ::

Custom Search