JavaScript and Frames, Part I: Controlling Multiple Frames - www.docjavascript.com
来源:百度文库 编辑:神马文学网 时间:2024/04/27 14:04:19
Controlling Multiple Frames
One of the capabilities of frame sets is the ability to control multiple frames from a single frame. There are two basic ways to do it. The first one is a combination of an HREF and an event handler assignment:
Multiple Load #1
In this example, we first load frame4new.html (HREF="frame4new.html") at the bottom row frame (TARGET="bottomrow"). Then, we use the onClick event handler to load the file frame4new.html in frame no. 1:
onClick="parent.frames[1].location.href = ‘frame4new.html‘;
The second approach is to include all operations in the HREF‘s javascript: URL:
Multiple Load #2
Here we assign frame4new.html to both frame 1 and frame 2. Although this technique doesn‘t degrade as well as the first for non-javascript enabled browsers, it is more straight-forward. Familiar yourself with the javascript: URL and its usage. We have covered this subject inColumn 34, for example. Remember to return void from you JavaScript statements, as explained in Column34. It‘s time toplay with the frames now. Convince yourself that both methods work the same and as described above.
Here is frame1new.html:
Frame 1 Frame 1
One of the capabilities of frame sets is the ability to control multiple frames from a single frame. There are two basic ways to do it. The first one is a combination of an HREF and an event handler assignment:
Multiple Load #1
In this example, we first load frame4new.html (HREF="frame4new.html") at the bottom row frame (TARGET="bottomrow"). Then, we use the onClick event handler to load the file frame4new.html in frame no. 1:
onClick="parent.frames[1].location.href = ‘frame4new.html‘;
The second approach is to include all operations in the HREF‘s javascript: URL:
Multiple Load #2
Here we assign frame4new.html to both frame 1 and frame 2. Although this technique doesn‘t degrade as well as the first for non-javascript enabled browsers, it is more straight-forward. Familiar yourself with the javascript: URL and its usage. We have covered this subject inColumn 34, for example. Remember to return void from you JavaScript statements, as explained in Column34. It‘s time toplay with the frames now. Convince yourself that both methods work the same and as described above.
Here is frame1new.html:
Multiple Load #1
// (The above two lines should be joined as one line.// They have been split for formatting purposes.)Multiple Load #2// (The above two lines should be joined as one line.// They have been split for formatting purposes.)
JavaScript and Frames, Part I: Controlling Multiple Frames - www.docjavascript.com
JavaScript and Frames, Part I: Escaping Frames
JavaScript and Frames, Part I: Forcing Frames
JavaScript and Frames, Part I: A Live Example
Grundfos SEV and SE1 - Frames
IE 6.0 - JavaScript - Introduction to Frames
HTML框架(Frames)
B-Frames in DirectShow
HTML框架(Frames)
素材库各种画框.25 Picture frames
SQL Server Performance - Common Symptoms and Tools (Part I)
PRB: Permission Denied Error Message When Scripting Across Frames
PRB: Permission Denied Error Message When Scripting Across Frames
A Taste of AOP from Solving Problems with OOP and Design Patterns (Part I)
JavaScript一些实用技巧 - 今晚在线 - www.GamVan.com
Multiple Intelligences Theory and English Language Teaching
Held by the Taliban. Part Four - A Drone Strike and Dwindling Hope - Series - NYTimes.com
Measure Network Performance: iperf and ntop - www.enterpriseitplanet.com
概述: Solaris 概述 part I
Wireless Development Tutorial Part I
JavaScript触发器 - SharkUI.com
Things You Should Never Do, Part I
Friends 116 TOW Two Parts, Part I
Friends 116 TOW Two Parts, Part I