Get jspx at SourceForge.net. Fast, secure and Free Open Source software downloads home | download | demo project | contact us
jspx

Rate this article:

email
comment
Average Rate= 0.0

Masked Input

HTML input text fields can have a mask pattaren to facilitate data entry for specific format. Mask is entered in a special attribute named mask.
This is baed on Masked Input Plugin

Demo

Date 99/99/9999
Phone (999) 999-9999
Phone + Ext (999) 999-9999? x99999
Tax ID 99-9999999
SSN 999-99-9999
Product Key a*-999-a999
Eye Script ~9.99 ~9.99 999
IP4 Address 999.999.999.999

Source Code:

			
				<table border="0">
				<tbody>
					<tr>
						<td>Date</td><td>
						<input type="text" tabindex="1" id="date" mask="99/99/9999"/>
						</td><td>99/99/9999</td>
					</tr>
					<tr>
						<td>Phone</td><td>
						<input type="text" tabindex="3" id="phone" mask="(999) 999-9999"/>
						</td><td>(999) 999-9999</td>
					</tr>
					<tr>
						<td>Phone + Ext</td><td>
						<input type="text" tabindex="4" id="phoneext" mask="(999) 999-9999? x99999"/>
						</td><td>(999) 999-9999? x99999</td>
					</tr>
					<tr>
						<td>Tax ID</td><td>
						<input type="text" tabindex="5" id="tin" mask="99-9999999"/>
						</td><td>99-9999999</td>
					</tr>
					<tr>
						<td>SSN</td><td>
						<input type="text" tabindex="6" id="ssn" mask="999-99-9999"/>
						</td><td>999-99-9999</td>
					</tr>
					<tr>
						<td>Product Key</td><td>
						<input type="text" tabindex="7" id="product" mask="a*-999-a999"/>
						</td><td>a*-999-a999</td>
					</tr>
					<tr>
						<td>Eye Script</td><td>
						<input type="text" tabindex="8" id="eyescript" mask="~9.99 ~9.99 999"/>
						</td><td>~9.99 ~9.99 999</td>
					</tr>
					<tr>
						<td>IP4 Address</td><td>
						<input type="text" tabindex="8" id="ip4" mask="999.999.999.999"/>
						</td><td>999.999.999.999</td>
					</tr>
				</tbody>
			</table>