Skip to the content.
How JavaScript Makes Web Pages More Interactive
- JavaScript allows you to make web pages more interactive.
- JavaScript accesses and modifies the content and markup used ina web page while it is being viewed in the browser.
- JavaScript encompasses many of the traditional rules of programming.
- JavaScript can make the web page feel interactive by responding to what the user does.
- ACCESS CONTENT
- You can use JavaScript to select any element, attribute, or text from an HTML page.
- MODIFY CONTENT
- You can use JavaScript to add elements, attribute, and text to the page, or remove them.
- PROGRAM RULES
- You can specify a set of steps for the browser to follow, which allows it to access or change the content of a page.
- REACT TO EVENTS
- You can specify that a script should run when a specific event has occurred.
Examples of JavaScript In the Browser
- Access the content of the page
- Modify the content of the page
- Program rules or instructions the browser can follow
- React to events triggered by the user or browser
SLIDESHOWS
- Slideshows cna display a number of different images within the same space on a given page.
- They can play automatically as a sequence, or users can click through the slides manually.
- They allow more content to be displayed within a limited amount of space.
- Validating forms is important when information is supplied by users.
- JavaScript lets you alert the user if mistakes have been made.
- It can also perform sophisticated calculations based on any data entered and reveal the results to the user.
REROAD PART OF PAGE
- You might not want to force visitors to reload the content of an entire web page, particularly if you only need to refresh a small portion of a page.
- Just reloading a section of the page can make a site feel like it is faster to load and more like an application.