O'Reilly logo

Building UIs with Wijmo by Yuguang Zhang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

InputMask

The InputMask widget shows the user the correct format for an input box. In addition, it prevents invalid input and gives visual cues about the data required. An example is shown as follows:

InputMask

The input format is specified by a mask. A list of options are available on http://wijmo.com/wiki/index.php/InputMask. For our example, we make an input mask for U.S. phone numbers where the area codes are optional. These optional characters can be left blank:

<!DOCTYPE HTML> <html> <head> ... <script id="scriptInit" type="text/javascript"> $(document).ready(function () { $("#textbox1").wijinputmask({ mask: '(999) 000 - 0000' }); }); </script> </head> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required