29 Questions
Which JavaScript event occurs when the user double-clicks on an element?
ondblclick
What JavaScript event occurs when the user right-clicks on an element to open a context menu?
oncontextmenu
Which event occurs when the user moves the mouse pointer out of an element or one of its children?
onmouseout
When does the 'onmouseenter' event occur in JavaScript?
When the pointer moves onto an element
What event occurs when the user releases a mouse button while over an element?
onmouseup
Which JavaScript event occurs when the pointer is moving while it is over an element?
onmousemove
What should be used instead of curved quotation marks in the provided HTML code?
Double quotes
What does the document.bgColor
property allow you to change?
The background color of the entire webpage
What is the purpose of the onmouseover
event handler in the provided HTML code?
To change the background color of the entire page to green
What is the general form of a JavaScript function?
Using the function keyword and taking parameters, and returning a value
How do JavaScript functions help organize code?
By promoting code reusability
Which HTML element is used to create a large and bold heading text?
What happens when the mouse pointer moves away from the heading text in the provided HTML code?
The background color changes back to yellow
What does the align='center'
attribute do in the `` element?
Horizontally center-aligns the text
Which attribute is used to specify what should happen when the mouse pointer interacts with an element in the provided HTML code?
onmouseover
Who was the creator of JavaScript?
Brendan Eich
What was the initial name of JavaScript during its development?
Mocha
In what year was JavaScript created?
1995
Which company was Brendan Eich working for when he created JavaScript?
Netscape Communications
What strategic partnership led to the renaming of JavaScript?
Sun Microsystems
What type of programming language is JavaScript primarily used for?
Web development
When was ECMAScript 3 released?
1999
What significant enhancements were introduced in ECMAScript 5 (ES5)?
Strict mode, JSON support, improved array manipulation methods
What significantly accelerated web development in the 2000s - Present era?
JavaScript libraries like jQuery and frameworks like Angular and React
Who developed Node.js, bringing JavaScript to the server-side?
Ryan Dahl
What is the primary purpose of ECMAScript 6 (ES6)?
To introduce numerous new features and enhancements to JavaScript
What is the Document Object Model (DOM) primarily used for in JavaScript?
Manipulating web page elements dynamically
What are some examples of JavaScript libraries and frameworks that significantly accelerated web development?
jQuery and Angular
In what year was Node.js developed, bringing JavaScript to the server-side?
2009
Study Notes
JavaScript Events
- The
dblclick
event occurs when the user double-clicks on an element. - The
contextmenu
event occurs when the user right-clicks on an element to open a context menu. - The
mouseout
event occurs when the user moves the mouse pointer out of an element or one of its children. - The
onmouseenter
event occurs when the user moves the mouse pointer into an element. - The
mouseup
event occurs when the user releases a mouse button while over an element. - The
mousemove
event occurs when the pointer is moving while it is over an element.
HTML and JavaScript
- Straight quotation marks should be used instead of curved quotation marks in HTML code.
- The
document.bgColor
property allows you to change the background color of a document. - The
onmouseover
event handler is used to specify what should happen when the mouse pointer interacts with an element. - The general form of a JavaScript function is
function name(parameters) { code }
. - JavaScript functions help organize code by grouping related statements together.
HTML Elements
- The `` element is used to create a large and bold heading text.
- The
align='center'
attribute is used to center-align the content of an element. - The
onmouseover
andonmouseout
event handlers are used to specify what should happen when the mouse pointer interacts with an element.
JavaScript History
- JavaScript was created by Brendan Eich in 1995 while working at Netscape Communications.
- The initial name of JavaScript during its development was Mocha.
- JavaScript was renamed from Mocha to JavaScript due to a strategic partnership with Sun Microsystems.
- JavaScript is primarily used for client-side scripting on the web.
ECMAScript
- ECMAScript 3 was released in 1999.
- ECMAScript 5 (ES5) introduced significant enhancements, including strict mode and native JSON support.
- ECMAScript 6 (ES6) introduced new features, such as classes and promises, to improve the language.
- ECMAScript is the standard scripting language for web browsers.
Node.js and Server-Side JavaScript
- Node.js was developed by Ryan Dahl in 2009, bringing JavaScript to the server-side.
- Node.js allows JavaScript to run on the server-side, making it possible to use JavaScript for both client-side and server-side development.
JavaScript Libraries and Frameworks
- Examples of JavaScript libraries and frameworks that significantly accelerated web development include jQuery, React, and Angular.
- These libraries and frameworks provide pre-built functionality and tools to make web development faster and more efficient.
Document Object Model (DOM)
- The Document Object Model (DOM) is primarily used to interact with and manipulate the structure and content of web pages.
- The DOM represents the structure of a document as a tree of nodes, allowing JavaScript to access and modify the document's elements and content.
Test your knowledge on JavaScript events, which are actions or occurrences that happen in the browser as a result of user interactions or system events. Learn how to respond to these events by defining functions that will execute when the event occurs.
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free