5555. The script should use string method split to extract the area code as a token. The first three digit of the phone number as a token, the last four digits of the phone number as a token. Display the area code in one text field and seven digit phone numbers in another text field.
var code = telephone.split(')');
document.getElementById('first_text_field').value = code;
document.getElementById('second_text_field').value = telephone;
You must replace names in getElementById with real Id's of your project.
Need a fast expert's response?Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!