layout/html/tests/attributes/div_p_heading.html
author Honza Bambas <honzab@allpeers.com>
Fri, 10 Oct 2008 16:41:38 +0200
changeset 20258 097bf47abbcde2ba53c62212eca60c5cb5d9ce9d
parent 1 9b2a99adc05e53cd4010de512f50118594756650
permissions -rw-r--r--
Bug 413909 - nsCertOverrideService IDN handling is broken; tests; r=kaie

<HTML>
<BODY>
<H1 ALIGN="center">This text is inside an H1 tag.</H1>
<DIV ALIGN="center" NOSHADE SIZE="5" WIDTH="50">This text is inside a DIV tag.</DIV>
<P ALIGN="center"> This text is inside a P tag.</P>

<P>
Use the buttons below to change the align attribute for the text showm
above.
</P>

<FORM>
<P>
Set <I>align</I> to
<SELECT SIZE="1" NAME="align">
<OPTION SELECTED VALUE="center">Center</OPTION>
<OPTION VALUE="left">Left</OPTION>
<OPTION VALUE="right">Right</OPTION>
</SELECT>
<INPUT TYPE="button" VALUE="Change Align" onClick="changeAlign(); return true;">
</P>
</FORM>
<SCRIPT>
var h1 = document.getElementsByTagName("h1")[0];
var div = document.getElementsByTagName("div")[0];
var para = document.getElementsByTagName("p")[0];
function changeAlign() {   
   if (document.forms[0].align.selectedIndex == 0) {
      h1.align = div.align = para.align = "center";
   }
   else if (document.forms[0].align.selectedIndex == 1) {
      h1.align = div.align = para.align = "left";
   }
   else {
      h1.align = div.align = para.align = "right";
   }
}
</SCRIPT>
</BODY>
</HTML>