Showing posts from April, 2024

DOM Manipulation - Basics

Here are a couple of tasks related to DOM manipulation. If you have not completed other tasks of DOM manipulation yet, I suggest to start from from the below list, as these are very simple and easy ones. Task 1 Get a number from user using a text field. Add a standard button below the input field. When clicked, in alert box, show the square of number. e.g. if user entered 6, in alert, show 36. Task 2 Create two text input fields to get two numbers from user. Make a group of radio buttons with options: Add, Subtract, Multiply, and Divide. Then, add a standard button labled "Calculate", when clicked, perform the selected arithmatic operation and display the result in a div below the button. Task 3 Make a link and use attributes like: href, title, target, rel. Below that link is clicked, print the mentioed attributes values on console. Task 4 Create an option list using <select> and <option> tags. It shall contains 4-5 cities. After the list, add a remove button, whe