mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Adding test case for attribute changes on the BR element via the DOM.
This commit is contained in:
parent
8fee9617b2
commit
d0ab536a28
37
layout/html/tests/br.html
Normal file
37
layout/html/tests/br.html
Normal file
@ -0,0 +1,37 @@
|
||||
<HTML>
|
||||
<BODY>
|
||||
<IMG src="resource:/res/samples/raptor.jpg" STYLE="float: left;">
|
||||
<IMG src="mynet.gif" STYLE="float: right;">
|
||||
This text should appear between a left justified and right justified image of a raptor.<BR>
|
||||
Resize the window such that this paragraph is located between the two images. Then
|
||||
use the form below to change the "clear" attribute of the BR tag that adds a linebreak
|
||||
between this para and the previous one. Clearing to left should position this para below
|
||||
the raptor. Clearing to the right or clearing all should position this para below the My
|
||||
Netscape ad.
|
||||
<FORM>
|
||||
<P>
|
||||
Set <I>clear</I> to
|
||||
<SELECT SIZE="1" NAME="clear">
|
||||
<OPTION SELECTED VALUE="none">None</OPTION>
|
||||
<OPTION VALUE="left">Left</OPTION>
|
||||
<OPTION VALUE="right">Right</OPTION>
|
||||
<OPTION VALUE="all">All</OPTION>
|
||||
</SELECT>
|
||||
<INPUT TYPE="button" VALUE="Change Clear" onClick="changeClear(); return true;">
|
||||
</P>
|
||||
</FORM>
|
||||
<SCRIPT>
|
||||
var br = document.getElementsByTagName("br")[0];
|
||||
function changeClear() {
|
||||
if (document.forms[0].clear.selectedIndex == 0)
|
||||
br.clear = "none";
|
||||
else if (document.forms[0].clear.selectedIndex == 1)
|
||||
br.clear = "left";
|
||||
else if (document.forms[0].clear.selectedIndex == 1)
|
||||
br.clear = "right";
|
||||
else
|
||||
br.clear = "all";
|
||||
}
|
||||
</SCRIPT>
|
||||
</BODY>
|
||||
</HTML>
|
BIN
layout/html/tests/mynet.gif
Normal file
BIN
layout/html/tests/mynet.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.3 KiB |
Loading…
Reference in New Issue
Block a user