Skip to main content
Apply for a Cheap Website
Website explainer · 1:47

JavaScript Explained: The Behaviour Behind Interactive Websites

What makes a website react when you click? JavaScript can add behaviour and update page content.

Jersey Web video: What makes a page respond?

1:47 · No narration: the video shows each step as text on screen, and every step is written out below, with buttons that jump the video to it.

Download the on-screen text track (VTT)

The six points in the video

This is a silent video. The headings, explanations and labels below reproduce the information on screen.

  1. Step 1: It is a programming language

    JavaScript can run instructions in the browser.

    On-screen labels: Program logic; Browser execution; Interactive behaviour.

  2. Step 2: It responds to events

    A click, key press or submitted form can trigger an action.

    On-screen labels: Click or tap; Keyboard action; Form submission.

  3. Step 3: It can update the page

    Useful changes can happen without a full page reload.

    On-screen labels: Updated results; Visible feedback; Changed content.

  4. Step 4: It can contact services

    A page can request data and display the response.

    On-screen labels: Service request; Returned data; Updated interface.

  5. Step 5: Keep interactions accessible

    Keyboard operation and clear feedback still need attention.

    On-screen labels: Keyboard access; Visible status; Useful error messages.

  6. Step 6: Test failure as well as success

    Important tasks need sensible handling when something goes wrong.

    On-screen labels: Slow response; Failed request; Recoverable next step.

A practical check for your business

Identify which tasks depend on JavaScript and test their failure states. A form, menu or booking widget should provide a useful result or explanation when its expected script cannot complete the task.

Sources and further detail

Common questions

What makes a website react when you click?

JavaScript can add behaviour and update page content. Make every interaction serve a useful task.

Go further

Guide Read the practical guide More context for planning and maintaining your business website. 5 min read → Jargon Buster JavaScript explained Read the related Jargon Buster explanation. Read the explanation →

Make every interaction serve a useful task.

Tell Jersey Web what your website needs to do and which part you want help with.

Talk to Jersey Web →

More video tips

All 205 videos →
Length 1:47 Website foundations

Frontend vs Backend: Which Part of a Website Does What?

Frontend and backend, explained.
Length 1:47 Account security

Website Databases Explained: Content, Records and Recovery

Website databases, explained.
Length 1:47 Account security

Website Cookies Explained: Sessions, Preferences and Tracking

Small pieces of browser data.