The DOM has an API
Javascript, JQuery, DOM, API

The DOM (Document Object Model) has an API. 

Think about it. The DOM has a public interface for modification by JavaScript - or JavaScript libraries for DOM modification like JQuery.

Learning how to modify the DOM API - also called a Web API - via pure JavaScript is an important skill.

element = Document.getElementById('survey_form')

Document.activeElement

var string = document.URL

(returns the URL of the document object!)

element.id

element.className

DOM elements that are exposed and which you can modify include:

  • Element
  • URL
  • Window

More about the Web API / DOM API, which JavaScript and/or JQuery are able to interface with - https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model

 

| Back

Footerfull