The document discusses the JavaScript execution environment and the Document Object Model (DOM). It describes:
1. How a browser displays an XHTML document and how JavaScript interacts with the window and document objects.
2. The evolution of the DOM standard from DOM 0 to DOM 3 and how it provides a mapping of web documents to JavaScript objects.
3. How events are handled in JavaScript, including the basic concepts of events, event handlers, and the DOM 0 and DOM 2 event models.
Objects in JavaScript can be created using object literals, the new keyword, or Object.create(). Objects are collections of properties and methods that are mutable and manipulated by reference. Arrays are objects that represent ordered collections of values of any type and are created using array literals or the Array constructor. Common array methods include concat, join, pop, push, reverse, and sort. The Math object provides common mathematical functions like pow, round, ceil, floor, random, and trigonometric functions.
JavaScript is the programming language of the web. It can dynamically manipulate HTML content by changing element properties like innerHTML. Functions allow JavaScript code to run in response to events like button clicks or timeouts. JavaScript uses objects and prototypes to define reusable behaviors and properties for objects. It is an important language for web developers to learn alongside HTML and CSS.
The document discusses various PHP functions for manipulating files including:
- readfile() which reads a file and writes it to the output buffer
- fopen() which opens files and gives more options than readfile()
- fread() which reads from an open file
- fclose() which closes an open file
- fgets() which reads a single line from a file
- feof() which checks if the end-of-file has been reached
It also discusses sanitizing user input before passing it to execution functions to prevent malicious commands from being run.
This document discusses HTML forms and how they are used to send data to a server. It explains the GET and POST methods for sending form data, as well as the PHP superglobal variables ($_GET, $_POST, $_REQUEST) that are used to collect the data on the server side. The GET method appends data to the URL and has limitations on size, while the POST method embeds data in the HTTP request body and has no size limits, making it more secure for sensitive data. Both methods create arrays of key-value pairs from the form fields to populate the respective superglobal variables.
The document discusses various event handling classes in Java including ActionEvent, KeyEvent, MouseEvent, MouseMotionEvent, FocusEvent, WindowEvent, and ItemEvent. It provides examples of how to use each event class by implementing the appropriate listener interface and defining event handling methods. Key points covered include common event handling terms like event, event source, and event listener. It also summarizes the typical methods provided by each event class.
A class is a template / blue print is used to create an object. In JavaScript class is a special kind of function. In JavaScript there are two ways to create class one is the class declaration and the second one is class expressions.
DOM and SAX are two APIs for working with XML documents. DOM loads the entire XML document into memory as a tree structure, allowing manipulation of the document. SAX is event-based and reads the XML document sequentially, invoking callback functions at element boundaries. Compared to DOM, SAX uses less memory but only allows reading of the document. Both APIs are supported across many programming languages including PHP.
Objects in JavaScript can be created using object literals, the new keyword, or Object.create(). Objects are collections of properties and methods that are mutable and manipulated by reference. Arrays are objects that represent ordered collections of values of any type and are created using array literals or the Array constructor. Common array methods include concat, join, pop, push, reverse, and sort. The Math object provides common mathematical functions like pow, round, ceil, floor, random, and trigonometric functions.
JavaScript is the programming language of the web. It can dynamically manipulate HTML content by changing element properties like innerHTML. Functions allow JavaScript code to run in response to events like button clicks or timeouts. JavaScript uses objects and prototypes to define reusable behaviors and properties for objects. It is an important language for web developers to learn alongside HTML and CSS.
The document discusses various PHP functions for manipulating files including:
- readfile() which reads a file and writes it to the output buffer
- fopen() which opens files and gives more options than readfile()
- fread() which reads from an open file
- fclose() which closes an open file
- fgets() which reads a single line from a file
- feof() which checks if the end-of-file has been reached
It also discusses sanitizing user input before passing it to execution functions to prevent malicious commands from being run.
This document discusses HTML forms and how they are used to send data to a server. It explains the GET and POST methods for sending form data, as well as the PHP superglobal variables ($_GET, $_POST, $_REQUEST) that are used to collect the data on the server side. The GET method appends data to the URL and has limitations on size, while the POST method embeds data in the HTTP request body and has no size limits, making it more secure for sensitive data. Both methods create arrays of key-value pairs from the form fields to populate the respective superglobal variables.
The document discusses various event handling classes in Java including ActionEvent, KeyEvent, MouseEvent, MouseMotionEvent, FocusEvent, WindowEvent, and ItemEvent. It provides examples of how to use each event class by implementing the appropriate listener interface and defining event handling methods. Key points covered include common event handling terms like event, event source, and event listener. It also summarizes the typical methods provided by each event class.
A class is a template / blue print is used to create an object. In JavaScript class is a special kind of function. In JavaScript there are two ways to create class one is the class declaration and the second one is class expressions.
DOM and SAX are two APIs for working with XML documents. DOM loads the entire XML document into memory as a tree structure, allowing manipulation of the document. SAX is event-based and reads the XML document sequentially, invoking callback functions at element boundaries. Compared to DOM, SAX uses less memory but only allows reading of the document. Both APIs are supported across many programming languages including PHP.
This document discusses JavaScript events. It defines an event as an action a script can respond to, such as clicks or keystrokes. Event handlers are functions assigned to events that run when the event occurs. Events follow a cycle of capturing, targeting, and bubbling. Common event types include mouse, keyboard, loading, selection, and other events. The document provides examples of using event handlers with buttons, images, and adding/removing event listeners.
This document discusses JavaScript events and event listeners. It begins with an introduction that defines events as notifications that specific actions occurred, like user or browser actions. Event handlers are scripts that are executed in response to events. Events can be used to trigger JavaScript code that responds to user interactions. The document then provides examples of common event types like onclick, onsubmit, onmouseover, onmouseout, focus, and blur. It also discusses how to add and remove event listeners using addEventListener() and removeEventListener() methods. The document concludes with an example demonstrating how events can be used to change an HTML element in response to user clicks.
This document discusses JavaScript variables, functions, and objects. It covers JavaScript datatypes like numbers, strings, and objects. It describes variable scope and how variables are hoisted or moved to the top of their function. It also discusses how functions can be defined and used as variables. Global objects like the window object are described. Finally, it provides examples of defining basic functions and using objects with properties and methods.
The document discusses different types of operators in VB.NET including arithmetic, comparison, logical, and concatenation operators. It provides examples of each operator type and describes their functionality. Specifically, it outlines the different arithmetic operators and their use, comparison operators and how they are used to compare values, logical operators like AND, OR, and NOT and how they perform logical operations on expressions, and concatenation operators for joining string values. Tables of results are provided for the logical operators.
This document discusses ADO.NET, which is a data access technology that allows applications to connect to and manipulate data from various sources. It describes the core ADO.NET objects like Connection, Command, DataReader, DataAdapter, DataSet and DataTable. It also explains the differences between connected and disconnected data access models in ADO.NET, detailing the objects used in each approach and their advantages. Finally, it provides an overview of commonly used .NET data providers like SqlClient, OleDb and Odbc.
What is the DOM?
The DOM is a W3C (World Wide Web Consortium) standard.
The DOM defines a standard for accessing documents:
"The W3C Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of a document."
The W3C DOM standard is separated into 3 different parts:
Core DOM - standard model for all document types
XML DOM - standard model for XML documents
HTML DOM - standard model for HTML documents
The HTML DOM (Document Object Model)
When a web page is loaded, the browser creates a Document Object Model of the page.
The HTML DOM model is constructed as a tree of Objects.
With the HTML DOM, JavaScript can access and change all the elements of an HTML document.
This document discusses ADO.NET, which is a set of classes that allows .NET applications to communicate with databases. It provides advantages over classic ADO such as supporting both connected and disconnected data access. The key components of ADO.NET are data providers, which act as bridges between applications and databases, and the DataSet, which allows storing and manipulating relational data in memory disconnected from the database.
This document provides an overview of various controls in ASP.NET, including their properties and uses. It discusses standard controls like labels, text boxes, buttons, link buttons, hyperlinks, list boxes, check boxes, dropdown lists, radio buttons, images and image maps. It also covers validators, data controls like grid views, repeaters, data lists and details views, and data sources. The document is intended as a training guide for new ASP.NET developers.
Loops execute a block of code a specified number of times, or while a specified condition is true.
Often when you write code, you want the same block of code to run over and over again in a row. Instead of adding several almost equal lines in a script we can use loops to perform a task like this.
In PHP, we have the following looping statements:
while - loops through a block of code while a specified condition is true
do...while - loops through a block of code once, and then repeats the loop as long as a specified condition is true
for - loops through a block of code a specified number of times
foreach - loops through a block of code for each element in an array
Visual Basic .NET (VB.NET or VB .NET) is a version of Microsoft's Visual Basic that was designed, as part of the company's .NET product group, to make Web services applications easier to develop.
This chapter introduces XHTML and covers:
- The transition from HTML to XHTML and XML syntax requirements
- The anatomy of a web page including head, body, and DTD sections
- Common inline and block-level tags for formatting text and elements
- Special characters and how to display them
- Creating hyperlinks within and between pages using absolute and relative linking
The document discusses several rich controls in ASP.NET including the AdRotator, File Upload, Multiview, Calendar, and Wizard controls. It provides descriptions of each control and examples of how to use their key properties. Some key advantages of rich controls mentioned are that they are flexible, reduce code needs, and improve performance by combining standard controls into a single control.
Using this presentation you will learn dividing the browser window into different parts(frame). With frames, several Web pages can be displayed in the same browser window.
This document provides an overview of Cascading Style Sheets (CSS) including:
- CSS handles the look and feel of web pages by controlling colors, fonts, spacing, layouts, backgrounds and more.
- CSS versions include CSS1 for basic formatting, CSS2 for media styles and positioning, and CSS3 for new features like colors and transforms.
- There are three ways to apply stylesheets: inline with HTML tags, internally within <style> tags, and externally with <link> tags.
- The Style Builder in Microsoft allows applying styles through a dialog box with options for fonts, backgrounds, text, positioning, and other properties. Basic CSS syntax uses selectors and properties to
The document describes what an XML Schema is and its key components and purposes. It defines an XML Schema as describing the structure of an XML document, and that it can define elements, attributes, element sequence and number, data types, and default values. It compares XML Schemas to DTDs, noting schemas are more powerful and support namespaces and data types. The document provides examples of using XML Schema to define simple and complex elements, attributes, and restrictions.
The document discusses Java event handling and the delegation event model. It describes key concepts like events, sources that generate events, and listeners that handle events. It provides examples of registering components as listeners and implementing listener interfaces. The delegation event model joins sources, listeners, and events by notifying listeners when sources generate events.
XML is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. It was designed to carry data, not display it like HTML. XML is important because it separates data from presentation, allows data to be shared across different systems, and makes data easier to store and process. The basic building blocks of XML include elements, attributes, entities, processing instructions, comments, and tags.
This document provides an overview of AJAX and jQuery. It begins by stating the objectives of the document, which are to identify the AJAX web application model, work with AJAX and jQuery, implement selectors, manipulate the DOM, implement jQuery UI widgets. It then provides information on introducing AJAX, including how it allows asynchronous updating of web pages. It describes the components that AJAX uses, including XMLHttpRequest, JavaScript, DOM, and CSS. It also provides examples of how AJAX is used in real-life scenarios and browsers that support AJAX.
The document summarizes key aspects of the window and document objects in JavaScript:
- The window object represents the browser window and contains the document. Global variables and functions are properties and methods of the window.
- The document object represents the HTML document loaded in the window and allows accessing and manipulating page elements.
- Elements can be accessed by ID, name, position, or associative arrays. Event handlers can be used to execute code when events occur on elements.
The DOM (Document Object Model) allows programs and scripts to dynamically access and update the content, structure and style of documents. It gives generic access to elements, styles and attributes in a document. The DOM organizes how elements are referenced and interact with each other. Examples show how scripts reference elements, apply styles, and change styles. Different document objects like the document, anchor, button, form, image and event objects are used to access and manipulate HTML and XML documents. The DOM provides a standard programming interface for working with documents across environments and applications.
This document discusses JavaScript events. It defines an event as an action a script can respond to, such as clicks or keystrokes. Event handlers are functions assigned to events that run when the event occurs. Events follow a cycle of capturing, targeting, and bubbling. Common event types include mouse, keyboard, loading, selection, and other events. The document provides examples of using event handlers with buttons, images, and adding/removing event listeners.
This document discusses JavaScript events and event listeners. It begins with an introduction that defines events as notifications that specific actions occurred, like user or browser actions. Event handlers are scripts that are executed in response to events. Events can be used to trigger JavaScript code that responds to user interactions. The document then provides examples of common event types like onclick, onsubmit, onmouseover, onmouseout, focus, and blur. It also discusses how to add and remove event listeners using addEventListener() and removeEventListener() methods. The document concludes with an example demonstrating how events can be used to change an HTML element in response to user clicks.
This document discusses JavaScript variables, functions, and objects. It covers JavaScript datatypes like numbers, strings, and objects. It describes variable scope and how variables are hoisted or moved to the top of their function. It also discusses how functions can be defined and used as variables. Global objects like the window object are described. Finally, it provides examples of defining basic functions and using objects with properties and methods.
The document discusses different types of operators in VB.NET including arithmetic, comparison, logical, and concatenation operators. It provides examples of each operator type and describes their functionality. Specifically, it outlines the different arithmetic operators and their use, comparison operators and how they are used to compare values, logical operators like AND, OR, and NOT and how they perform logical operations on expressions, and concatenation operators for joining string values. Tables of results are provided for the logical operators.
This document discusses ADO.NET, which is a data access technology that allows applications to connect to and manipulate data from various sources. It describes the core ADO.NET objects like Connection, Command, DataReader, DataAdapter, DataSet and DataTable. It also explains the differences between connected and disconnected data access models in ADO.NET, detailing the objects used in each approach and their advantages. Finally, it provides an overview of commonly used .NET data providers like SqlClient, OleDb and Odbc.
What is the DOM?
The DOM is a W3C (World Wide Web Consortium) standard.
The DOM defines a standard for accessing documents:
"The W3C Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of a document."
The W3C DOM standard is separated into 3 different parts:
Core DOM - standard model for all document types
XML DOM - standard model for XML documents
HTML DOM - standard model for HTML documents
The HTML DOM (Document Object Model)
When a web page is loaded, the browser creates a Document Object Model of the page.
The HTML DOM model is constructed as a tree of Objects.
With the HTML DOM, JavaScript can access and change all the elements of an HTML document.
This document discusses ADO.NET, which is a set of classes that allows .NET applications to communicate with databases. It provides advantages over classic ADO such as supporting both connected and disconnected data access. The key components of ADO.NET are data providers, which act as bridges between applications and databases, and the DataSet, which allows storing and manipulating relational data in memory disconnected from the database.
This document provides an overview of various controls in ASP.NET, including their properties and uses. It discusses standard controls like labels, text boxes, buttons, link buttons, hyperlinks, list boxes, check boxes, dropdown lists, radio buttons, images and image maps. It also covers validators, data controls like grid views, repeaters, data lists and details views, and data sources. The document is intended as a training guide for new ASP.NET developers.
Loops execute a block of code a specified number of times, or while a specified condition is true.
Often when you write code, you want the same block of code to run over and over again in a row. Instead of adding several almost equal lines in a script we can use loops to perform a task like this.
In PHP, we have the following looping statements:
while - loops through a block of code while a specified condition is true
do...while - loops through a block of code once, and then repeats the loop as long as a specified condition is true
for - loops through a block of code a specified number of times
foreach - loops through a block of code for each element in an array
Visual Basic .NET (VB.NET or VB .NET) is a version of Microsoft's Visual Basic that was designed, as part of the company's .NET product group, to make Web services applications easier to develop.
This chapter introduces XHTML and covers:
- The transition from HTML to XHTML and XML syntax requirements
- The anatomy of a web page including head, body, and DTD sections
- Common inline and block-level tags for formatting text and elements
- Special characters and how to display them
- Creating hyperlinks within and between pages using absolute and relative linking
The document discusses several rich controls in ASP.NET including the AdRotator, File Upload, Multiview, Calendar, and Wizard controls. It provides descriptions of each control and examples of how to use their key properties. Some key advantages of rich controls mentioned are that they are flexible, reduce code needs, and improve performance by combining standard controls into a single control.
Using this presentation you will learn dividing the browser window into different parts(frame). With frames, several Web pages can be displayed in the same browser window.
This document provides an overview of Cascading Style Sheets (CSS) including:
- CSS handles the look and feel of web pages by controlling colors, fonts, spacing, layouts, backgrounds and more.
- CSS versions include CSS1 for basic formatting, CSS2 for media styles and positioning, and CSS3 for new features like colors and transforms.
- There are three ways to apply stylesheets: inline with HTML tags, internally within <style> tags, and externally with <link> tags.
- The Style Builder in Microsoft allows applying styles through a dialog box with options for fonts, backgrounds, text, positioning, and other properties. Basic CSS syntax uses selectors and properties to
The document describes what an XML Schema is and its key components and purposes. It defines an XML Schema as describing the structure of an XML document, and that it can define elements, attributes, element sequence and number, data types, and default values. It compares XML Schemas to DTDs, noting schemas are more powerful and support namespaces and data types. The document provides examples of using XML Schema to define simple and complex elements, attributes, and restrictions.
The document discusses Java event handling and the delegation event model. It describes key concepts like events, sources that generate events, and listeners that handle events. It provides examples of registering components as listeners and implementing listener interfaces. The delegation event model joins sources, listeners, and events by notifying listeners when sources generate events.
XML is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. It was designed to carry data, not display it like HTML. XML is important because it separates data from presentation, allows data to be shared across different systems, and makes data easier to store and process. The basic building blocks of XML include elements, attributes, entities, processing instructions, comments, and tags.
This document provides an overview of AJAX and jQuery. It begins by stating the objectives of the document, which are to identify the AJAX web application model, work with AJAX and jQuery, implement selectors, manipulate the DOM, implement jQuery UI widgets. It then provides information on introducing AJAX, including how it allows asynchronous updating of web pages. It describes the components that AJAX uses, including XMLHttpRequest, JavaScript, DOM, and CSS. It also provides examples of how AJAX is used in real-life scenarios and browsers that support AJAX.
The document summarizes key aspects of the window and document objects in JavaScript:
- The window object represents the browser window and contains the document. Global variables and functions are properties and methods of the window.
- The document object represents the HTML document loaded in the window and allows accessing and manipulating page elements.
- Elements can be accessed by ID, name, position, or associative arrays. Event handlers can be used to execute code when events occur on elements.
The DOM (Document Object Model) allows programs and scripts to dynamically access and update the content, structure and style of documents. It gives generic access to elements, styles and attributes in a document. The DOM organizes how elements are referenced and interact with each other. Examples show how scripts reference elements, apply styles, and change styles. Different document objects like the document, anchor, button, form, image and event objects are used to access and manipulate HTML and XML documents. The DOM provides a standard programming interface for working with documents across environments and applications.
This document provides an overview of JavaScript DOM (Document Object Model) and various JavaScript objects used to manipulate web pages and interact with browsers. It describes the DOM hierarchy with the window and document objects at the top. It also covers built-in JavaScript objects like String, Math, Date, forms, and cookies as well as how to define custom user objects. Methods and properties of different objects are defined throughout.
DOM(Document Object Model) in javascriptRashmi Mishra
Title: Mastering JavaScript: From Basics to Advanced
Description:
Enhance your JavaScript skills with our comprehensive presentation designed for both beginners and advanced learners. This detailed guide covers essential topics, including:
JavaScript Fundamentals: Variables, data types, functions, and loops
DOM Manipulation: Accessing and modifying HTML elements
Advanced Concepts: Closures, promises, async/await
Practical Examples: Real-world applications and coding exercises
Key Features:
Clear, concise explanations of key JavaScript concepts
High-quality visuals to aid understanding
Practical code examples and exercises
Links to additional resources and full study materials
Why You’ll Love This Presentation:
Perfect for self-learners and students
Great reference for developers at all levels
Continuously updated content to stay current with industry trends
Get the Full Study Materials:
Visit our website [YourWebsite.com] for the complete JavaScript study guide, detailed cheat sheets, and exclusive tutorials.
Join our newsletter for updates and special offers on our educational products.
The document provides an introduction to JavaScript, including:
1) Why JavaScript was created, its syntax, and how to include it in HTML documents.
2) How JavaScript objects work and some predefined JavaScript objects like Math, String, and Array.
3) Examples of JavaScript functions, strings, and how to manipulate elements using the DOM.
4) JavaScript events and how code can run when events occur on HTML elements.
5) Methods for accessing and modifying DOM elements directly through properties, IDs, and collections.
JavaScript is a scripting language that allows adding interactivity to HTML pages. It can react to events, read and write HTML elements, validate data, detect the visitor's browser, create cookies, and more. The DOM defines a standard for accessing and manipulating HTML documents. JavaScript uses objects, functions, and prototypes for object-oriented programming. Key concepts include encapsulation, inheritance, and abstraction. Events follow the capturing and bubbling phases. JavaScript supports conditionals, loops, functions, scopes, closures, and more.
When an HTML document loads in a browser, it becomes a document object that represents the DOM tree. The document object is the root node that contains all other nodes and provides access to them through properties and methods from JavaScript. This allows JavaScript to dynamically change HTML elements, attributes, styles, add and remove nodes, and react to events. The DOM defines HTML elements as objects that have properties and methods that can be used to manipulate the document.
This document discusses automating Internet Explorer using VB6. It covers topics like using COM objects in VB6 to control IE, adding IE references in VB6 projects, viewing IE object methods and properties, browsing to websites and waiting for pages to load, enumerating open IE windows, and interacting with common HTML elements like links, text boxes, combo boxes using the HTML DOM. It also mentions limitations of the DOM like cross-domain security restrictions.
jQuery is a JavaScript library that simplifies HTML document traversal, event handling, animating, and Ajax interactions. It was created in 2006 with the goal of writing less code to do more. jQuery simplifies tasks like selecting elements, handling events, performing animations and AJAX calls to make web development faster.
The document provides information about Dynamic Hypertext Markup Language (DHTML). It discusses that DHTML is not a language itself but a combination of technologies including HTML, CSS, JavaScript, and DOM to make web pages dynamic and interactive. It then explains the four main components of DHTML and provides examples of using JavaScript, DOM, events, and CSS to manipulate HTML elements and create dynamic content. The document also covers advantages and disadvantages of DHTML.
INTRODUCTION TO CLIENT SIDE PROGRAMMINGProf Ansari
1 JavaScript was designed to add interactivity to HTML pages.
2 It is a scripting language.
3 A scripting language is a lightweight programming language.
4 A JavaScript consists of lines of executable computer code.
5 It is usually embedded directly into HTML pages.
6 It is an interpreted language (means that scripts execute without preliminary compilation).
7 Everyone can use JavaScript without purchasing a license.
The document discusses the Document Object Model (DOM) including its origins, structure as a hierarchical tree of objects, and how it allows JavaScript to dynamically access and update the content, structure, and style of documents. It provides examples of how to select elements by id or tag name, modify attributes, insert and remove nodes, and interact with the DOM through JavaScript to manipulate HTML and XML documents.
The document discusses several JavaScript objects for manipulating the DOM and accessing browser properties and methods. It describes the window, document, form, frame, history, navigator, and location objects. The window object represents the browser window and is the top level object. The document object represents the entire HTML document. The form object handles form data submission and validation.
This document discusses dynamic HTML (DHTML) and how it allows web pages to be dynamic and interactive. It defines DHTML as a combination of CSS, JavaScript, DOM, and HTML that can be used together to create dynamic web pages. Key features of DHTML include dynamic styling, content changes, and positioning in response to user events like mouse clicks or keyboard inputs.
Education is a powerful tool that opens up the mind and expands our horizons. It provides us with the knowledge and skills necessary to succeed in life and make positive contributions to society.
“Life is too short to waste. Dreams are fulfilled only through action…not through endless planning to take action.“
Internet and Web Technology (CLASS-6) [BOM] Ayes Chinmay
The document provides information on the JavaScript and Browser Object Models (BOM). It discusses the BOM hierarchy with the window object at the top level representing the browser window. It contains the document and other objects like navigator, screen, history, and location. The document object represents the web page and contains HTML elements. Other sections explain the window, navigator, screen and BOM objects in more detail through examples and their properties/methods.
Internet and Web Technology (CLASS-5) [HTML DOM] Ayes Chinmay
The document discusses HTML DOM (Document Object Model) and JavaScript. It defines DOM as a programming interface that defines the logical structure of HTML and XML documents and allows programs to access and manipulate them. It notes that DOM has three parts: Core DOM, XML DOM, and HTML DOM. It then lists some of the main DOM objects like the Window, Document, Form, and anchor objects. It provides examples of using DOM to represent an HTML table and asks some multiple choice questions about DOM, CSS, and HTML.
This document provides an introduction to jQuery, including:
- What jQuery is and its main features like DOM manipulation, CSS manipulation, events, effects, animations, and AJAX.
- The benefits of jQuery like being browser independent and increasing coding speed.
- How to add jQuery to web pages by downloading the jQuery library, including the jQuery file, and writing jQuery code within script tags.
- jQuery selectors that allow selecting elements based on name, id, classes, attributes, and more. Common selectors include element, id, class, and universal selectors.
- jQuery events like click, change, submit, and how to attach event handler functions using methods like click(), change
This document discusses HTML collections and event handling in JavaScript. It provides examples of how to access elements in HTML collections using methods like getElementsByTagName. It also covers different types of events like click, mouseover, form submit and how to attach event handlers using inline, traditional and modern approaches. It discusses timing events like setTimeout and setInterval. Finally it covers event propagation models of bubbling and capturing.
The document discusses the Document Object Model (DOM) and how JavaScript can be used to manipulate HTML elements and react to events. It defines the DOM as a programming interface that represents HTML documents as nodes and objects, allowing JavaScript to modify their structure, style, and content. It then covers how JavaScript can be used to change HTML elements and attributes, styles, add and remove elements and attributes, and react to HTML events by using event handlers and listeners. It also discusses traversing the DOM node tree and different event types.
Similar to Unit ii java script and xhtml documents and dynamic documents with javascript (20)
Computer Network Chapter 1 includes the following content.
Electromagnetic waves – Generation of electromagnetic waves and their properties.
Electromagnetic spectrum – classification and applications.
Communication Systems – Basic elements of communication systems with block diagram, List commonly used terms in electronic communication systems, Data representation, Data flow, Modulation, Demodulation Analog and Digital Signals, Periodic and Non-Periodic Signals, Sine Wave, Phase, Wavelength, Digital Signals, Bitrate, Bit-length.
Overview of Operating System, Need for OS, Structure, OS Types, Examples of OS (desktop and mobile) Dual mode operation, Kernel and microkernel, Functions of OS User interfaces; Corporate Vs Personal needs; Types of OS Installation.
The document provides a history of the origins and development of the Internet from the 1960s to the 1990s. It describes how ARPANET was developed in the 1960s by the US Department of Defense and its Advanced Research Projects Agency (ARPA) to enable resource sharing between researchers. It evolved into a "network of networks" known as the Internet in the 1990s through networks like NSFNET that connected universities. The document also gives brief overviews of web browsers, web servers, URLs, and the Hypertext Transfer Protocol.
The document discusses key concepts related to process management in operating systems, including processes, process states, process scheduling, and interprocess communication. It defines a process as a program in execution that includes a program counter, stack, and data section. Processes can be in one of several states like new, running, waiting, ready, and terminated. Process scheduling is managed using data structures like process control blocks and queues to track process states and allocate CPU resources. Common scheduling algorithms like FCFS, SJF, priority, and round robin are also covered.
The document provides an introduction to operating systems. It discusses what operating systems do, including acting as an intermediary between the user and computer hardware. It covers operating system structure, including multiprogramming and timesharing to improve efficiency. It also discusses key operating system operations like process management, memory management, storage management, protection and security. It provides examples of different computing environments that operating systems support, such as client-server, peer-to-peer, and web-based computing.
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...indexPub
The recent surge in pro-Palestine student activism has prompted significant responses from universities, ranging from negotiations and divestment commitments to increased transparency about investments in companies supporting the war on Gaza. This activism has led to the cessation of student encampments but also highlighted the substantial sacrifices made by students, including academic disruptions and personal risks. The primary drivers of these protests are poor university administration, lack of transparency, and inadequate communication between officials and students. This study examines the profound emotional, psychological, and professional impacts on students engaged in pro-Palestine protests, focusing on Generation Z's (Gen-Z) activism dynamics. This paper explores the significant sacrifices made by these students and even the professors supporting the pro-Palestine movement, with a focus on recent global movements. Through an in-depth analysis of printed and electronic media, the study examines the impacts of these sacrifices on the academic and personal lives of those involved. The paper highlights examples from various universities, demonstrating student activism's long-term and short-term effects, including disciplinary actions, social backlash, and career implications. The researchers also explore the broader implications of student sacrifices. The findings reveal that these sacrifices are driven by a profound commitment to justice and human rights, and are influenced by the increasing availability of information, peer interactions, and personal convictions. The study also discusses the broader implications of this activism, comparing it to historical precedents and assessing its potential to influence policy and public opinion. The emotional and psychological toll on student activists is significant, but their sense of purpose and community support mitigates some of these challenges. However, the researchers call for acknowledging the broader Impact of these sacrifices on the future global movement of FreePalestine.
Brand Guideline of Bashundhara A4 Paper - 2024khabri85
It outlines the basic identity elements such as symbol, logotype, colors, and typefaces. It provides examples of applying the identity to materials like letterhead, business cards, reports, folders, and websites.
Information and Communication Technology in EducationMJDuyan
(𝐓𝐋𝐄 𝟏𝟎𝟎) (𝐋𝐞𝐬𝐬𝐨𝐧 2)-𝐏𝐫𝐞𝐥𝐢𝐦𝐬
𝐄𝐱𝐩𝐥𝐚𝐢𝐧 𝐭𝐡𝐞 𝐈𝐂𝐓 𝐢𝐧 𝐞𝐝𝐮𝐜𝐚𝐭𝐢𝐨𝐧:
Students will be able to explain the role and impact of Information and Communication Technology (ICT) in education. They will understand how ICT tools, such as computers, the internet, and educational software, enhance learning and teaching processes. By exploring various ICT applications, students will recognize how these technologies facilitate access to information, improve communication, support collaboration, and enable personalized learning experiences.
𝐃𝐢𝐬𝐜𝐮𝐬𝐬 𝐭𝐡𝐞 𝐫𝐞𝐥𝐢𝐚𝐛𝐥𝐞 𝐬𝐨𝐮𝐫𝐜𝐞𝐬 𝐨𝐧 𝐭𝐡𝐞 𝐢𝐧𝐭𝐞𝐫𝐧𝐞𝐭:
-Students will be able to discuss what constitutes reliable sources on the internet. They will learn to identify key characteristics of trustworthy information, such as credibility, accuracy, and authority. By examining different types of online sources, students will develop skills to evaluate the reliability of websites and content, ensuring they can distinguish between reputable information and misinformation.
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptxCapitolTechU
Slides from a Capitol Technology University webinar held June 20, 2024. The webinar featured Dr. Donovan Wright, presenting on the Department of Defense Digital Transformation.
A Free 200-Page eBook ~ Brain and Mind Exercise.pptxOH TEIK BIN
(A Free eBook comprising 3 Sets of Presentation of a selection of Puzzles, Brain Teasers and Thinking Problems to exercise both the mind and the Right and Left Brain. To help keep the mind and brain fit and healthy. Good for both the young and old alike.
Answers are given for all the puzzles and problems.)
With Metta,
Bro. Oh Teik Bin 🙏🤓🤔🥰
2. UNIT-2: JavaScript and XHTML Document
The JavaScript Execution Environment
A browser displays an XHTML document in a window on
the screen of the client. The JavaScript Window object
represents the window that displays the document.
All JavaScript variables are properties of some object. The
properties of the Window object are visible to all
JavaScript scripts that appear in the window’s XHTML
document.
There can be more than one Window object. However, we
deal only with scripts with a single Window object.
3. The JavaScript Document object represents the displayed
XHTML document. Every Window object has a property
named document, which is a reference to the Document
object that the window displays.
Every Document object has a forms array, each element of
which represents a form in the document. Each Forms
array element has an elements array as a property, which
contains the objects that represent the XHTML form
elements, such as buttons and menus.
The JavaScript objects associated with the elements in a
document can be addressed in a script in several ways.
Document objects also have property arrays for anchors,
links, images, and applets.
4. The Document Object Model
The Document Object Model (DOM) has been under
development by the W3C. At the time of this writing, DOM 2
was the latest approved version, and DOM 3 was under
development.
The original motivation for the standard DOM was to provide a
mapping of the web documents into the object in all browsers.
These objects are accessible by the JavaScript.
DOM 0 is the name often used to describe the document model
used by the early browsers that supported JavaScript.
Specifically, DOM 0 is the version of the document model
implemented in the Netscape 3.0 and Internet Explorer 3.0
browsers. The DOM 0 model was partially documented in the
HTML 4 specification.
DOM 1, the first W3C DOM specification, issued in October
1998, focused on the XHTML and XML document model.
5. DOM 2, issued in November 2000, specifies a style sheet
object model and defines how style information attached to a
document can be manipulated. It also includes document
traversals and provides a complete and comprehensive event
model.
DOM 3 will deal with content models for XML (DTDs and
schemas), document validation, and document views and
formatting, as well as key events and event groups.
The DOM is an application programming interface (API) that
defines an interface between XHTML documents and
application programs.
Each language that interfaces with the DOM must define a
binding to that interface. The actual DOM specification
consists of a collection of interfaces, including one for each
document tree node type.
Documents in the DOM have a treelike structure, but there
can be more than one tree in a document. Therefore, in an
implementation, the relationships among the elements of a
document can be represented in any number of different
ways.
6. The following XHTML document and its corresponding
DOM tree illustrate the relationship between them.
html xmlns = “http://www.w3.org/1999/xhtml” >
<head> <title>A Simple Document </title> </head>
<body>
<table>
<tr>
<th>Breakfast</th>
<td>0</td>
<td>1</td>
</tr>
<tr>
<th>Lunch</th>
<td>1</td>
<td>0</td>
</tr>
</table>
</body>
</html>
8. In the JavaScript binding to the DOM, the elements of
a document are objects, with both data and
operations. The data are called properties, and the
operations are, called methods. For example, the
following element would be represented as an object
with two properties, type and name, with the values
"text" and "address", respectively:
<input type = "text" name = "address">
In most cases, the property names in JavaScript are the
same as their corresponding attribute names in
XHTML.
9. Element Access in JavaScript
There are several ways the object associated with an XHTML
form element can be addressed (accessed) in JavaScript.
Method-1 (Using forms and elements array): The
original (DOM 0) way is to use the forms and elements
arrays of the Document object, which is referenced through
the document property of the Window object.
For example, consider the following XHTML document:
<html xmlns = "http://www.w3.org/1999/xhtml">
<head> <title> Access to form elements </title> </head>
<body>
<form action = "">
<input type = "button" name = "turnIton" />
</form>
</body>
</html>
10. The DOM address of the button using the forms and
elements arrays, is as follows:
var dom = document.forms[0].elements[0];
Problem: The problem with this approach is that, If
we add or remove some elements in the form then the
DOM address could change. For example, if we add a
new button before the turnIton button in the
document, the DOM address shown would be wrong.
11. Method-2 (using elements Name): Another approach
to DOM addressing is to use element names. For this the
element and its enclosing elements must include name
attributes.
For example, consider the following document:
<html xmlns = "http://www.w3.org/1999/xhtml">
<head> <title> Access to form elements </title> </head>
<body>
<form name = "myForm" action = "">
<input type = "button" name = "turnIton" />
</form>
</body>
</html>
12. The DOM address of the button using the elements
name is as follows:
var dom = document.myForm. turnIton;
Problem: One drawback of this approach is that the
XHTML 1.1 standard does not allow the name attribute
in the form element.
13. Method-3 (Using getElementById method): Yet another
approach to element addressing is to use the JavaScript
method getElementById, which is defined in DOM 1. Because
an element's identifier (id) is unique in the document, this
approach works, regardless of how deeply the element is
nested in other elements in the document.
For example, consider the following document:
<html xmlns = "http://www.w3.org/1999/xhtml">
<head> <title> Access to form elements </title> </head>
<body>
<form name = "myForm" action = "">
<input type = "button" name = "turnIton“ id=“turnIton” />
</form>
</body>
The DOM address of the button using the getElementById
method, is as follows:
var dom = document.getElementById("turnIton");
14. Events and Event Handling
Basic Concepts of Event Handling
One important use of JavaScript for Web programming is to
detect certain activities of the browser and the browser user
and provide computation when these activities occur.
An event is a notification that something specific has
occurred, either with the browser, such as the completion of
the loading of a document, or because of a browser user
action, such as a mouse click on a form button.
Strictly speaking, an event is an object that is implicitly
created by the browser and the JavaScript system in response
to something happening.
An event handler is a script that is implicitly executed in
response to the appearance of an event. Event handlers
enable a Web document to be responsive to browser and user
activities.
15. Because events are JavaScript objects, their names are
case sensitive. The names of all event objects have only
lowercase letters. For example, click is an event, but
Click is not.
Events are created by activities associated with specific
XHTML elements. For example, the click event can be
caused by the browser user clicking a radio button or the
link of an anchor tag, among other things.
The process of connecting an event handler to an event is
called registration. There are two distinct approaches to
event handler registration, one that assigns tag attributes
and one that assigns handler addresses to object
properties.
16. Events, Attributes, and Tags
HTML 4 defined a collection of events, which browsers
implement and with which JavaScript can deal. These
events are associated with XHTML tag attributes,
which can be used to connect the events to handlers.
The attributes have names that are closely related to
their associated events.
Table 5.1 lists the most commonly used events and
their associated tag attributes.
17.
18. An XHTML text element is said to get focus when the
user puts the mouse cursor over it and clicks the left
mouse button.
An element can also get focus when the user tabs to
the element. Focus on an element can be forced with
focus method.
Table 5.2 shows the most commonly used attributes
related to events, tags that can include the attributes,
and the circumstances under which the associated
events are created.
19.
20.
21. The process of connecting an event handler to an event is
called registration. There are two ways to register an
event handler in the DOM 0 event model.
1. assigning the event handler script to an event tag
attribute
2. assigns handler addresses to object properties
In first method we assign the event handler script to an
tag attribute.
For example,
<input type="button" id="myButton" onclick="alert('You
clicked my button!');" />
22. In many cases, the handler consists of more than a
single statement. For these, often a function is used,
and the literal string value of the attribute is the call to
the function as follows:
<input type = "button" id="myButton"
onclick="myButtonHandler();" />
In second method we assign handler address to object
property.
For example, following example shows the handler
address is assigned to the button object.
document.getElementById("myButton").onclick=myBut
tonHandler;
23. Handling Events from Body Elements
The events most often created by body elements are
load and unload.
As our first example of event handling, we consider the
simple case of producing an alert message when the
body of the document has been loaded.
In this case, we use the onload attribute of <body> to
specify the event handler.
24. load.html
<html>
<head>
<title>Event From Body</title>
<script type="text/javascript" src="load.js">
</script>
</head>
<body onload="greeting();">
</body>
</html>
load.js
function greeting()
{
alert("you are visiting a Home Page n" + "Loaded from
body");
}
25. Handling Events from Button Elements
Buttons in a document provide a simple and effective
way to collect input from the browser user. The most
commonly used event created by button is click.
Consider the following example of a set off radio
buttons that enables the user to choose information
about a specific airplane. The click event is used this
example to trigger the call to alert, which presents a
brief description of the selected airplane.
In this example the event handler is registered by
assigning its call to the onclick attribute off the radio
button.
27. radio.js
function planechoice(plane)
{
switch(plane)
{
case 152:
alert("152 Model a small two-palce airplane");
break;
case 162:
alert("162 Model a small four-place airplane");
break;
case 172:
alert("172 Model a larger of two-place airplane");
break;
case 182:
alert("182 Model a larger of four-place airplane");
break;
default:
alert("Error in javascript function plane choice");
break;
}
}
28. The DOM 2 Event Model:
The DOM 2 event model is more sophisticated and
powerful than DOM 0. The real drawback of using the
DOM 2 model is that Microsoft has yet to provide
support for it in its browsers.
The DOM 2 model is a modularized interface. One of
the DOM 2 modules is Events, which includes several
sub modules. The most commonly used are
HTMLEvents and MouseEvents. The interfaces and
events defined by these modules are as follows:
29. Event Propagation
The connection between an event and the handler that deals
with it is very simple in the DOM 0 event model.
The event-handler connection for the DOM 2 event model is
much more complicated.
Briefly, what happens is as follows. An event object is created
at a node in the document tree. For that event, that node is
called the target node. Event creation causes a three-phase
process to begin.
The first of these phases is called the capturing phase. The
event starts at the document root node and propagates down
the tree to the target node. If there are any handlers for the
event registered on any node encountered in this propagation,
including the document root note, these handlers are checked
to determine whether they are enabled. Any enabled handler
for the event that is found during capturing is executed.
30. When the event reaches the target node, the second
phase takes place, in which the handlers registered for
the event at the target node are executed. The second
phase is similar to what happens with the DOM 0
event model. After execution of any appropriate
handlers at the target node, the third phase begins.
This is the bubbling phase, in which the event bubbles
back up the document tree to the document root node.
On this trip back up the tree, any handler registered
for the event at any node on the way is executed
(whether it is enabled or not).
31. Event Handler Registration
• Handler registration in the DOM 2 event model is performed
by the method addEventListener, which is defined in the
EventTarget interface, which is implemented by all objects that
descend from Document.
The addEventListener method takes three parameters,
The first of which is the name of the event as a string literal.
For example, "mouseup" and "submit" would be legitimate first
parameters.
The second parameter is the handler function. This could be
specified as the function code itself or as the name of a
function that is defined elsewhere.
The third parameter is a Boolean value that specifies whether
the handler is enabled for calling during the capturing phase.
If the value true is specified, the handler is enabled for the
capturing phase. In fact, an enabled handler can only be called
during capturing. If the value is false, the handler can be called
either at the target node or on any node reached during
bubbling.
32. For example, suppose we want to register the event
handler chkName on the text element whose id is
custName for the change event. The following call
accomplishes this:
document.custName.addEventListener( "change", chkName, false);
In this case, we want the handler to be called at the target
node, which is custName in this example, so we passed
false as the third parameter.
Sometimes it is convenient to have a temporary event
handler. This can be done by registering the handler for
the time when it is to be used, and then deleting that
registration. The removeEventListener method deletes the
registration of an event handler. This method takes the
same parameters as addEventListener.
33. The navigator Object
The navigator object indicates which browser is being
used to view the XHTML document.
The browser's name is stored in the appName property
of the navigator object.
The version of the browser is stored in the appVersion
property of the navigator object.
These properties allow the script to determine which
browser is being used and to use processes appropriate
to the browser.
The following example illustrates the use of the
navigator, In this case just to display the browser name
and version number.
35. DOM Tree Traversal and Modification
There are many objects, properties, and methods
associated with DOM 2 document representations.
One collection of these is defined in the Element
object and is used to traverse and modify the DOM
tree structure of the document being displayed.
In this section we briefly describe a few of the most
useful of these. All of the properties and methods
mentioned here are supported by both IE7 and FX2.
36. DOM Tree Traversal
The parentNode property has the DOM address of the
parent node of the node through which it is referenced.
The previousSibling property has the DOM address of the
previous sibling node of the node through which it is
referenced.
The nextSibling has the DOM address of the previous
sibling node of the node through which it is referenced.
The firstChild and lastChild properties have the DOM
addresses of the first and last child nodes of the node
through which they are referenced.
The nodeType property has the type of the node through
which it is referenced.
37. DOM Tree Modification
The following methods allow JavaScript code to modify
an existing DOM tree structure.
The insertBefore(newChild, refChild) places the
newChild node before the refChild node.
The replaceChild(newChild, oldChild) method replaces
the oldChild with the newChild node.
The removeChild(oldChild) method removes the
specified node from the DOM structure.
The appendChild(newChild) method adds the given
node to the end of the list of siblings of the node
through which it is called.