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
This 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
<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-->
<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><<I>ELEMENT</I><B>DIR</B> = sDir ... ></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. <body dir=rtl><BR>2. document.body.dir="rtl"<BR>3. any_object.dir="rtl" (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-->