»
EnglishFrenchVietnamese

Print - Sets or retrieves the reading order of the object - JavaScriptBank.com

Full version: jsB@nk » Browser » Page effect » Sets or retrieves the reading order of the object
URL: https://www.javascriptbank.com/sets-or-retrieves-the-reading-order-of-object.html

Sets or retrieves the reading order of the object © JavaScriptBank.comThis JavaScript will change scrollbar from right to left when vistors click button.

Full version: jsB@nk » Browser » Page effect » Sets or retrieves the reading order of the object
URL: https://www.javascriptbank.com/sets-or-retrieves-the-reading-order-of-object.html



JavaScript
<SCRIPT>i=1;function cg(){ i=-i; if (i==-1) document.body.dir="rtl" else document.body.dir="ltr";}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<FORM><INPUT name=Button onclick=cg() type=button value="Click to change reading order"></FORM><P>Syntax</P><BLOCKQUOTE>  <TABLE border=1>    <TBODY>    <TR>      <TH><B>HTML</B></TH>      <TD>&lt;<I>ELEMENT</I><B>DIR</B> = sDir ... &gt;</TD></TR>    <TR>      <TH><B>Scripting</B></TH>      <TD><I>object</I>.<B>dir</B> [ <B>=</B>sDir ]</TD></TR></TBODY></TABLE></BLOCKQUOTE><P><P>Possible Values</P><BLOCKQUOTE>  <TABLE border=1>    <TBODY>    <TR>      <TD>sDir</TD>      <TD>String that specifies one of the following values:         <TABLE>          <TBODY>          <TR>            <TD title="The default value is 'ltr'."><B>ltr</B></TD>            <TD>Text flow is left-to-right.</TD></TR>          <TR>            <TD><B>rtl</B></TD>            <TD>Text flow is right-to-left.</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BLOCKQUOTE><P><B><FONT size=5>Applies</FONT><FONT size=5> To</FONT></B></P><P align=justify><B>A, ACRONYM, ADDRESS, AREA, B, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, custom, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, Hn, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, KBD, LABEL, LEGEND, LI, LISTING, MAP, MARQUEE, MENU, NOBR, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP</B></P><P align=justify><B><FONT size=4>Use this<BR>1. &lt;body dir=rtl&gt;<BR>2. document.body.dir=&quot;rtl&quot;<BR>3. any_object.dir=&quot;rtl&quot; (note See list of any objects above)</FONT></B></P><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->