gecko-dev/layout/html/tests/Rotate.html

64 строки
2.9 KiB
HTML

<HTML>
<BODY>
<P>
Let's start with some text, have a <B>bold element</B>, an <I>italicized element</I> and then an image:
<IMG SRC="http://www.caboodles.com/clipart/archives/alt_bin/transport/car13.gif" width=100 height=80>
<font color="#0000FF">And now a lot more text. And now a lot more text. And now a lot more text.</font>
And now a lot more text. And now a lot more text. And now a lot more text.
<font color="#FF0000">And now a lot more text. And now a lot more text. And now a lot more text.</font>
And now a lot more text. And now a lot more text. And now a lot more text.
<font color="#00FF00">And now a lot more text. And now a lot more text. And now a lot more text.</font>
And now a lot more text. And now a lot more text. And now a lot more text.
<font face="Arial, Helvetica, sans-serif">And now a lot more text. And now a lot more text. And now a lot more text. </font>
<font face="Verdana, Arial, Helvetica, sans-serif">And now a lot more text. And now a lot more text. And now a lot more text. </font>
And now a lot more text. And now a lot more text. And now a lot more text.
<font face="Times New Roman, Times, serif">And now a lot more text. And now a lot more text. And now a lot more text. </font>
And now a lot more text. And now a lot more text. And now a lot more text.
<table border=2>
<tr><td><center><img SRC="http://zabadubop/layers/tests/mzcolor.gif">A table!</center></td><td><center>You're a brave man, Kipp.</center></td></tr>
<tr><td><center>And more text.</center></td><td><center>And still more text.</center></td></tr>
</table>
And now a lot more text. And now a lot more text. And now a lot more text.
<font size=6>And now a lot more text. And now a lot more text. And now a lot more text. </font>
And now a lot more text. And now a lot more text. And now a lot more text.
And now a lot more text. And now a lot more text. And now a lot more text.
And now a lot more text. And now a lot more text. And now a lot more text.
</P>
<SCRIPT>
var body = document.documentElement.childNodes[1];
var para = body.childNodes[1];
var img1 = para.childNodes[5];
var tbody = document.getElementsByTagName("TBODY")[0];
var tparent = tbody.childNodes[0].childNodes[0];
var img2 = tparent.childNodes[0].childNodes[0];
var pos = 0;
function rotate(p, c) {
p.removeChild(c);
var child = p.childNodes[pos++];
if (pos > p.childNodes.length) {
pos = 0;
}
p.insertBefore(c, child);
}
function rotate2() {
tparent.childNodes[0].removeChild(img2);
if (tparent.nextSibling != null) {
tparent = tparent.nextSibling;
}
else if (tparent.parentNode.nextSibling != null) {
tparent = tparent.parentNode.nextSibling.childNodes[0];
}
else {
tparent = tbody.childNodes[0].childNodes[0];
}
tparent.childNodes[0].insertBefore(img2, tparent.childNodes[0].childNodes[0]);
}
var int1 = setInterval(rotate, 1000, para, img1);
var int2 = setInterval(rotate2, 1000)
</SCRIPT>
</BODY>
</HTML>