Insert two external script elements that link to the french5.js and engfr.js files.
Insert an event handler into the body element that runs the function setup
Translation() when the page loads.
Close the file, saving your changes.
Use your editor to open the engfrtxt.js file .
Create a function named setUpTranslation(). The purpose of this function is to place the French phrases into the document and set up the event handlers for the mousedown and mouseup events. Add the following commands:
a. In Professor Granger’s document the phrases are placed in paragraphs. The phrase number is placed within the first span element inside the paragraph. The phrase text is placed in the second span element inside the paragraph. The phrase text is placed in the second span element within the paragraph. Crate a variable name phrases that contains the object collection of all the paragraph elements in Professor Granger’s document. Use the document.getElements ByTagName() method.
In my Web browser. Verify that as I press the mouse button down on each phrase, the English translation appears. When I release the mouse button, the French phrase should reappear.