Question: Java CPMS Write a Javascript function (in the .js file) named Theone with a parameter named size. For now keep it simple, have it loop

Java CPMS

  1. Write a Javascript function (in the .js file) named Theone with a parameter named size. For now keep it simple, have it loop 'size' number of times and build a string containing the HTML 'My Menu:' plus 'Button ' repeated 'size' number of times and return that string. If size was 3 then 'My Menu: Button Button Button' would be returned. This is not the final version of Theone, each time we add a new item to the page it will be updated.
  2. At the bottom of the web page (in the .html file) use getElementById() and call Theone to display the temporary menu in the proper spot on the web page
  3. Write a Javascript function (in the .js file) named Theone that will build and return the HTML below. This is the HTML for displaying a product for sale on the screen. This is not the final version of Theone, you will change and write new versions when more is added to the web page in future labs. For now, it is a place holder until we are ready to display an item for sale. This HTML does NOT go in the html file, it goes in the Javascript function which returns the html.
    My Product: Product Name: Product ID: Product Description: Shopping Cart Link Bar Product Image: 

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!