Write a simple web service that shows a 4 times 5 grid as in

Write a simple web service that shows a 4 times 5 grid (as in the above figure) and allows the user to perform some required operations. The user may enter any numeric values in the cells of the grid. Two buttons should be added: \"Swap The Two Selected Rows\" and \"Swap The Two Selected Columns\', which swaps any two rows (or columns) based on user\'s choice using a data list menu to determine which rows columns to be swapped. Notice that the data list for swapping rows must contain values from 1 to 4 whereas for swapping columns, it must contain values from 1 to 5. If any non-numeric value is detected in the grid when the user presses any of the two buttons, the page should inform the user that an error occurred using an alert or any other suitable method. In that case, the rows/columns should not be swapped. You will be using HTML forms, CSS and JavaScript (especially, two dimensional arrays) in this program. Use the CSS to enhance and adjust the appearance of the page elements. Your CSS and JavaScript code should be in two separate external files. The colors/design is of your choice and need not be as in the figure. For convenience, add a button that fills the entire grid with random integers having possible values from 1 up to a certain integer, chosen by the user using a slider (with slider values from 1 to 100.)

Solution

Ans-In this case needed also to add a name to all columns of the new table for convenience. I wrote a fucntion table \"swap the rows and columns\" as per your need just change the rows and columns number.

 Write a simple web service that shows a 4 times 5 grid (as in the above figure) and allows the user to perform some required operations. The user may enter any

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site