<input name="textfield" type="text" id="textfield" value="6267973685" /> Enter number like this and in next field it will display like this <input name="textfield2" type="text" id="textfield2" value="(626) 797-3685" /> I want this to be done using JavaScript i had tried this a lot but not find any success please help me in it.