Question: 1. Create an HTML page and save it as pr11_1.html. Add the necessary script tags to point to an external JavaScript file named prjs11_1.js. Add

1. Create an HTML page and save it as pr11_1.html. Add the necessary script tags to point to an external JavaScript file named prjs11_1.js. Add code so that there is a text box for a phone number with an id of pn and a text area for an address. Beside the phone number text box, there will be an empty span tag with an id of reminder. The body section of the HTML file should look like this when complete:

Phone Number:

2. Create an external JavaScript file and save it as prjs11_1.js. Use this for step 3 and step 5.

3. Get the pn and reminder elements by their ids and assign them to the variables pn and rm, respectively.

4. When pn receives focus, change the innerHTML of rm to the text Format: 123-456-7890. When pn is blurred, change the innerHTML of rm to an empty string ().

hint: use document.getElementById() to get node, then use .onfocus to add the event listener.

5. Save the HTML and JavaScript files, and load the HTML page in your browser.

Click inside the text box and a reminder message should appear next to it. Click the text area afterward to blur the text box and make the message disappear.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!