123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <!DOCTYPE html>
- <html>
- <!--
- Copyright 2010 The Closure Library Authors. All Rights Reserved.
- Use of this source code is governed by the Apache License, Version 2.0.
- See the COPYING file for details.
- -->
- <head>
- <title>goog.ui.BidiInput</title>
- <script type="text/javascript" src="../base.js"></script>
- <script type="text/javascript">
- goog.require('goog.ui.BidiInput');
- </script>
- <link rel="stylesheet" href="css/demo.css">
- </head>
- <body>
- <h1>goog.ui.BidiInput</h1>
- <p>
- The direction of the input field changes automatically to RTL (right to left)
- if the contents is in an RTL language (e.g. Hebrew or Arabic).
- </p>
- <fieldset>
- <legend>A decorated input: </legend>
- Text: <input type='text' id='c1' />
- <script type='text/javascript'>
- var c1 = new goog.ui.BidiInput();
- c1.decorate(goog.dom.getElement('c1'));
- </script>
- </fieldset>
- <br />
- <fieldset>
- <legend>An input created programmatically: </legend>
- Text: <span id='c2'></span> !
- <script type='text/javascript'>
- var c2 = new goog.ui.BidiInput();
- c2.render(goog.dom.getElement('c2'));
- </script>
- </fieldset>
- <br />
- <fieldset>
- <legend>A decorated textarea: </legend>
- <textarea id='c3'></textarea>
- <script type='text/javascript'>
- var c3 = new goog.ui.BidiInput();
- c3.decorate(goog.dom.getElement('c3'));
- </script>
- </fieldset>
- <br />
- <div dir='rtl'>
- <fieldset>
- <legend>Right to left div: </legend>
- <textarea id='c4'></textarea>
- <script type='text/javascript'>
- var c4 = new goog.ui.BidiInput();
- c4.decorate(goog.dom.getElement('c4'));
- </script>
- </fieldset>
- </div>
- </body>
- </html>
|