mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-14 14:02:47 +00:00
Test file for changing attributes on the PRE tag via the DOM.
This commit is contained in:
parent
f8b4bc0d49
commit
c2d0de6547
29
layout/html/tests/pre.html
Normal file
29
layout/html/tests/pre.html
Normal file
@ -0,0 +1,29 @@
|
||||
<HTML>
|
||||
<BODY>
|
||||
<PRE WIDTH="50">
|
||||
This text is within a PRE tag. This text is within a PRE tag.
|
||||
This text is within a PRE tag. This text is within a PRE tag.
|
||||
This text is within a PRE tag. This text is within a PRE tag.
|
||||
This text is within a PRE tag. This text is within a PRE tag.
|
||||
This text is within a PRE tag. This text is within a PRE tag.
|
||||
</PRE>
|
||||
<P>
|
||||
Use the buttons below to change the width attributes for the preformatted text above.
|
||||
</P>
|
||||
|
||||
<FORM>
|
||||
<P>
|
||||
Set <I>width</I> to
|
||||
<INPUT TYPE="text" NAME="width" VALUE="50">
|
||||
<INPUT TYPE="button" VALUE="Change Width" onClick="changeWidth(); return true;">
|
||||
</P>
|
||||
|
||||
</FORM>
|
||||
<SCRIPT>
|
||||
var pre = document.getElementsByTagName("pre")[0];
|
||||
function changeWidth() {
|
||||
pre.width = Math.abs(document.forms[0].width.value);
|
||||
}
|
||||
</SCRIPT>
|
||||
</BODY>
|
||||
</HTML>
|
Loading…
x
Reference in New Issue
Block a user