Try to answer these questions. Solution links are available below the questions.
Assign font size and font family and background colour to a <p> tag by using style property.
Use the above <p> tag in three places in a page and set this common style property to above tag.
Use the above code to style the tags in multiple pages by using common file.
What is a selector in JQuery ?
Click event of any element ( or button ) ?
On click of a button, welcome message should display.
There are five input textboxes. On click of the input box , the background colour should change to yellow. ( Hint : use this )
Remove and add different style to the element by using JQuery. Create two style classes and by default apply first one to one element. On click of a button change the elements associated property to other style.
Toggle the style properties of the element on click
Create one button and a textbox. On click of the button the text written in text box should display on the button.
Create a div tag and it should display Welcome message (by using JQuery )
Create two div tags and assign yellow as background colour to both of them by using JQuery.
Display and hide message shown in the div tag on click of the buttons. You can use Jquery show hide.
Display and hide message by using a single button . You can use Jquery toggle().
Create a div tag and on click of a button it should display your name.
Textarea counter & progress bar
Create one textarea and one button. On click of the button the length of text entered inside the textarea will be displayed.
In the above code show the counter as and when text is entered.
Use one progress bar for showing the number of text entered.
Create one style class and name it error, give its border colour as red and background colour as yellow. Apply this class to the text box when the focus is moved out of it and if entered data is more than 10.
Create two textboxes and one button with + on it. On click of the button you should display sum of the two entered numbers in textbox. Similarly add Subtract, Multiple and Division buttons.
Your buttons in above code will remain in disable state till both the inputs are filled. ( Use one function to enable or disable buttons. Trigger that function with on Blur events of the textboxes )
Handling form GET and POST methods
Create a form asking users to enter userid and password. On submit of the form the page should submit the data to backend page written in PHP or Python. Note that you are submitting the form using JQuery so page should not reload or redirect.
If submitted data is valid then the login form should show welcome message by hiding the input boxes, otherwise it should ask the user to try again.
Create one progress bar interlocked with a spinner. The value of spinner should reflect on the progress bar.