76 373
Assignments Done
Successfully Done
In May 2019

Answer to Question #3654 in AJAX | JavaScript | HTML | PHP for srujana

Question #3654
Write a script that inputs a telephone number as a string in the form (555)555-5555. The script should use String method split to extract the area code as a token, the first three digits of the phone number as a token and the last four digits of the phone number as a token. Display the area code in one text field and the seven-digit phone number in another text field.
Expert's answer
var p=window.prompt("Enter the phone in the form (XXX)XXX-XXXX",""); var code=p.split(")")[0].split("(")[1];
var p1=p.split(")")[1].split("-")[0];
var p2=p.split(")")[1].split("-")[1];
"); document.write("Phone:
"); document.write("");

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!


28.07.11, 20:50

For the above code the output is not generating...need help

Leave a comment

Ask Your question

Privacy policy Terms and Conditions