Online Forms and JavaScript Basics Quiz

TolerableTinWhistle avatar
TolerableTinWhistle
·
·
Download

Start Quiz

Study Flashcards

12 Questions

What is the purpose of online forms?

To gather information on the Internet

What distinguishes one input field from another?

The name attribute

Which programming language needs code compilation before execution?

Java

What type of language is JavaScript?

Interpreted language

Who developed JavaScript in September 1995?

Brandan Eich

Why does JavaScript require a web browser to run?

To interpret the commands

What is the main difference between client-side and server-side scripting?

Client-side scripting involves running scripts on the user's machine, while server-side scripting runs scripts on the server hosting the webpage.

What does Object-Oriented Programming (OOP) emphasize?

Treating every element in a system as an object with associated functions.

What are properties in programming related to objects?

Existing subsections of an object.

What are methods in programming mainly used for?

Representing functions designed for specific purposes like math operations or string parsing.

What is an Event in programming?

Something that happens or is done, like clicking a link or loading a page.

What is the purpose of saving JavaScript scripts with the extension '.js'?

To load them into the browser as standalone files.

Study Notes

Online Forms

  • Online forms are web pages designed to gather information on the Internet
  • HTML body tags are used to create online forms
  • Input tags are used to specify the type of input required
  • Name attribute is used to distinguish one input field from another

What is a Script?

  • A script is a set of computer instructions or commands that connect existing components to accomplish a new task

What is JavaScript?

  • JavaScript is a powerful client-side scripting language
  • It is interpreted by the web browser
  • Enables web developers and designers to build more functional and interactive websites

JavaScript Origins

  • Developed by Brendan Eich in September 1995
  • Originally named Mocha, later renamed to LiveScript and finally JavaScript

Characteristics of JavaScript

Interpreted Language

  • JavaScript is an interpreted language, requiring a browser to run
  • Unlike Java, which needs code to be compiled before execution

Scripting Language

  • Scripting languages are used to perform simple repetitive tasks
  • They do not have their own interfaces, but provide instructions to other programs
  • JavaScript is a scripting language, used to change webpage elements through the browser

Client-Side Scripting

  • Client-side scripting executes on the user's machine
  • JavaScript is a client-side scripting language
  • Server-side scripting (e.g., ASP, PHP, JSP) executes on the server machine

Object-Oriented Programming

  • JavaScript presents elements as objects, allowing easy manipulation
  • OOP treats system elements as objects, with associated functions (methods)

Text Editor and File Extensions

  • MS Notepad is a text editor that comes with Windows
  • JavaScript code embedded in HTML files do not need modifications to file extensions (.htm or .html)
  • Large scripts can be saved in separate files with a .js extension and loaded into a browser

Objects, Methods, and Properties

  • Objects are items that exist in the browser (e.g., browser window, page, status bar, date and time)
  • Methods are actions performed on or by an object (e.g., doing math or parsing strings)
  • Properties are existing subsections of an object

Events

  • Events are occurrences or actions (e.g., loading a page, holding a mouse over a link, or clicking a link)
  • Scripts can be written to execute when a specific event occurs

Test your knowledge on online forms, HTML input tags, and basic concepts of scripting languages like JavaScript. Learn about creating web pages for data collection and writing computer instructions for new tasks.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free
Use Quizgecko on...
Browser
Browser