Wijmo UI for the Web
Markup and Scripting
Wijmo User Guide > Widgets > Input Widgets > InputMask > Markup and Scripting

The HTML markup for a wijInputMask widget looks like this.

Markup
Copy Code
<input type="text" id="textbox1" />

You can initialize the widget and create its mask format with the following jQuery script. In this case, the input mask is a 10-character numeric input, a field for a phone number including an area code. You can make a variety of input masks, such as 7-digit phone numbers (000-0000) and social security numbers (000-00-0000).

Script
Copy Code
<script type="text/javascript">
    $(document).ready(function () {
        $("#textbox1").wijinputmask(
        {
            mask: '(999) 000 - 0000'
        });
    });
</script>

The markup and script featured here results in the following live widget.

See Also

Concepts

Reference