/[suikacvs]/www/test/dom/element/events/onload/iframe/set-src-dom-1.html
Suika

Contents of /www/test/dom/element/events/onload/iframe/set-src-dom-1.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download) (as text)
Thu May 10 12:32:43 2007 UTC (19 years, 2 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/html
New test

1 wakaba 1.1 <!DOCTYPE html>
2     <html>
3     <head>
4     <title>&lt;iframe>.onload Event Handler DOM Attribute and src='' DOM Attribute
5     Setting</title>
6     </head>
7     <body onunload="document.getElementsByTagName ('iframe')[0].onload = null">
8     <p><iframe src="about:blank">noiframe</iframe></p>
9     <p><button type="button" onclick="
10     var result = document.getElementById ('result');
11     result.innerHTML = 'not invoked yet';
12     var iframe = document.getElementsByTagName ('iframe')[0];
13     iframe.onload = function () {
14     if (iframe.src == 'http://www.w3.org/') {
15     result.innerHTML = 'invoked';
16     } else {
17     result.innerHTML = 'invoked but src != http://www.w3.org/';
18     }
19     };
20     iframe.src = 'http://www.w3.org/';
21     ">Click this button!</button></p>
22     <p id="result">not executed yet</p>
23     </body>
24     </html>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.24