JavaScript Справочник
Алфавитный справочник JavaScript
| Свойство/Метод | Описание | Принадлежит |
|---|---|---|
| abs() | Возвращает абсолютное значение x | Math |
| accessKey | Задает или возвращает атрибут доступа к элементу | Element |
| acos() | Возвращает арккосинус x в радианах | Math |
| acosh() | Возвращает гиперболический арккосинус x | Math |
| activeElement | Возвращает текущий сфокусированный элемент в документе | Document |
| addEventListener() | Прикрепляет обработчик события к документу | Document, Element |
| adoptNode() | Принимает узел из другого документа | Document |
| alert() | Отображает окно предупреждения с сообщением и кнопкой OK | Window |
| altKey | Возвращает значение "ALT" клавиша была нажата, когда событие мыши было запущено | MouseEvent, KeyboardEvent, TouchEvent |
| anchors | Возвращает коллекцию всех <a> элементы в документе, которые имеют атрибут name | Document |
| animationName | Возвращает имя анимации | AnimationEvent |
| appCodeName | Возвращает кодовое имя браузера | Navigator |
| appendChild() | Добавляет новый дочерний узел к элементу в качестве последнего дочернего узла | Element |
| applets | Возвращает коллекцию всех <applet> элементов в документе | Document |
| appName | Возвращает имя браузера | Navigator |
| appVersion | Возвращает информацию о версии браузера | Navigator |
| asin() | Возвращает информацию о версии браузера | Math |
| asinh() | Возвращает гиперболический арксинус x | Math |
| assert() | Выводит сообщение об ошибке в консоль, если утверждение ложно | Console |
| assign() | Загружает новый документ | Location |
| atan() | Возвращает арктангенс x как числовое значение в диапазоне от -PI/2 до PI/2 в радианах | Math |
| atan2() | Возвращает арктангенс частного своих аргументов | Math |
| atanh() | Возвращает гиперболический арктангенс x | Math |
| atob() | Декодирует строку в кодировке base-64 | Window |
| attributes | Возвращает NamedNodeMap атрибутов элемента | Element |
| availHeight | Возвращает высоту экрана (исключая панель задач Windows) | Screen |
| availWidth | Возвращает ширину экрана (исключая панель задач Windows) | Screen |
| back() | Загружает предыдущий URL в список истории | History |
| baseURI | Возвращает абсолютный базовый URI документа | Document |
| blur() | Удаляет фокус с элемента | Element, Window |
| body | Задает или возвращает тело документа (элемент <body>) | Document |
| break | Выход из switch или цикла | Statements |
| btoa() | Кодирует строку в base-64 | Window |
| bubbles | Возвращает, является ли конкретное событие всплывающим событием | Event |
| button | Возвращает, какая кнопка мыши была нажата при запуске события мыши | MouseEvent |
| buttons | Возвращает, какие кнопки мыши были нажаты при запуске события мыши | MouseEvent |
| cancelable | Возвращает, может ли событие предотвратить действие по умолчанию | Event |
| cbrt() | Возвращает кубический корень из x | Math |
| ceil() | Возвращает x, округленное в большую сторону до ближайшего целого числа | Math |
| changeTouches | Возвращает список всех сенсорных объектов, состояние которых изменилось между предыдущим касанием и этим касанием | TouchEvent |
| characterSet | Возвращает кодировку символов для документа | Document |
| charAt() | Возвращает символ по указанному индексу (позиции) | String |
| charCode | Возвращает код символа Unicode клавиши, вызвавшей событие onkeypress | KeyboardEvent |
| charCodeAt() | Возвращает Unicode символа по указанному индексу | String |
| charset | Устаревший. Вместо этого используйте characterSet. Возвращает кодировку символов для документа | Document |
| childElementCount | Возвращает количество дочерних элементов, которые имеет элемент | Element |
| childNodes | Возвращает коллекцию дочерних узлов элемента (включая узлы текста и комментариев) | Element |
| children | Возвращает коллекцию дочерних элементов элемента (исключая узлы текста и комментариев) | Element |
| classList | Возвращает имя(я) класса элемента | Element |
| class | Объявляет класс | Statements |
| className | Задает или возвращает значение атрибута класса элемента | Element |
| clear() | Очищает консоль | Console, Storage |
| clearInterval() | Очищает таймер, установленный с помощью setInterval() | Window |
| clearTimeout() | Очищает таймер, установленный с помощью setTimeout() | Window |
| clearWatch() | Отменить регистрацию обработчиков местоположения/мониторинга ошибок, ранее установленных с помощью Geolocation.watchPosition() | Geolocation |
| click() | Имитирует клик мышью по элементу | Element |
| clientHeight | Возвращает высоту элемента, включая отступы | Element |
| clientLeft | Возвращает ширину левой границы элемента | Element |
| clientTop | Возвращает ширину верхней границы элемента | Element |
| clientWidth | Возвращает ширину элемента, включая отступы | Element |
| clientX | Возвращает горизонтальную координату указателя мыши относительно текущего окна, когда было инициировано событие мыши | MouseEvent, TouchEvent |
| clientY | Возвращает вертикальную координату указателя мыши относительно текущего окна, когда было инициировано событие мыши | MouseEvent, TouchEvent |
| clipboardData | Возвращает объект, содержащий данные, затронутые операцией буфера обмена | ClipboardData |
| closed | Возвращает логическое значение, указывающее, было ли окно закрыто или нет | Window |
| close() | Закрывает выходной поток, ранее открытый с помощью document.open() | Document, Window |
| closest() | Ищет в дереве DOM ближайший элемент, который соответствует указанному селектору CSS | Element |
| clz32(x) | Возвращает количество ведущих нулей в 32-битном двоичном представлении x | Math |
| code | Возвращает код клавиши, вызвавшей событие | KeyboardEvent |
| colorDepth | Возвращает разрядность цветовой палитры для отображения изображений | Screen |
| compareDocumentPosition() | Сравнивает позицию документа двух элементов | Element |
| compile() | Устарело в версии 1.5. Компилирует регулярное выражение | RegExp |
| composed | Возвращает, составлено ли событие или нет | Event |
| concat() | Объединяет два или более массива и возвращает копию объединенных массивов | Array, String |
| confirm() | Отображает диалоговое окно с сообщением, кнопками OK и Cancel | Window |
| const | Объявляет переменную с постоянным значением | Statements |
| constructor() | Создает и инициализирует объекты, созданные в классе | Classes |
| constructor | Возвращает функцию, создавшую прототип объекта Array | Array, Boolean, Date, Number, RegExp |
| contains() | Возвращает true, если узел является потомком узла, иначе false | Element |
| contentEditable | Устанавливает или возвращает, является ли содержимое элемента редактируемым или нет | Element |
| continue | Прерывает одну итерацию (в цикле), если возникает указанное условие, и продолжает следующую итерацию в цикле | Statements |
| console | Возвращает ссылку на объект Console, который предоставляет методы для записи информации в консоль браузера (See Console object) | Window |
| cookie | Возвращает все пары имя/значение файлов cookie в документе | Document |
| cookieEnabled | Определяет, включены ли файлы cookie в браузере | Navigator |
| coordinates | Возвращает положение и высоту (координаты) устройства на Земле | Geolocation |
| copyWithin() | Копирует элементы массива внутри массива в указанные позиции и обратно | Array |
| cos(x) | Возвращает косинус x (x в радианах) | Math |
| cosh(x) | Возвращает гиперболический косинус x | Math |
| count() | Регистрирует количество раз, когда вызывался этот конкретный вызов count() | Console |
| createAttribute() | Создает узел атрибута | Document |
| createComment() | Создает узел Comment с указанным текстом | Document |
| createDocumentFragment() | Создает пустой узел DocumentFragment | Document |
| createElement() | Создает узел элемента | Document |
| createEvent() | Создает новое событие | Document, Event |
| createTextNode() | Создает текстовый узел | Document |
| ctrlKey | Возвращает значение "CTRL" клавиша была нажата, когда событие мыши было запущено | MouseEvent, KeyboardEvent, TouchEvent |
| currentTarget | Возвращает элемент, прослушиватели событий которого инициировали событие | Event |
| data | Возвращает вставленные символы | InputEvent |
| dataTransfer | Возвращает объект, содержащий перетаскиваемые/удаляемые или вставляемые/удаляемые данные | DragEvent, InputEvent |
| debugger | Останавливает выполнение JavaScript и вызывает (если доступно) функцию отладки | Statements |
| decodeURI() | Декодирует URI | Global |
| decodeURIComponent() | Декодирует компонент URI | Global |
| defaultPrevented | Возвращает, был ли вызван метод preventDefault() для события | Event |
| defaultStatus | Задает или возвращает текст по умолчанию в строке состояния окна | Window |
| defaultView | Возвращает объект окна, связанный с документом, или null, если он недоступен | Document |
| delete | Удаляет свойство из объекта | Operators |
| deltaX | Возвращает количество горизонтальной прокрутки колесика мыши (ось X) | WheelEvent |
| deltaY | Возвращает величину вертикальной прокрутки колесика мыши (ось Y) | WheelEvent |
| deltaZ | Возвращает количество прокрутки колесика мыши по оси Z | WheelEvent |
| deltaMode | Возвращает число, представляющее единицу измерения дельта-значений (пикселей, строк или страниц) | WheelEvent |
| designMode | Определяет, должен ли весь документ быть редактируемым или нет | Document |
| detail | Возвращает число, указывающее, сколько раз была нажата мышь | UiEvent |
| do ... while | Выполняет блок операторов и повторяет блок, пока условие true | Statements |
| doctype | Возвращает объявление типа документа, связанное с документом | Document |
| document | Возвращает объект Document для окна, см. (Объект Document) | Window |
| documentElement | Возвращает элемент документа (элемента <html>) | Document |
| documentMode | Возвращает режим, используемый браузером для рендеринга документа | Document |
| documentURI | Задает или возвращает местоположение документа | Document |
| domain | Возвращает доменное имя сервера, загрузившего документ | Document |
| domConfig | Устарело. Возвращает конфигурацию DOM документа | Document |
| elapsedTime | Возвращает количество секунд, в течение которых выполнялась анимация | AnimationEvent |
| elapsedTime | Возвращает количество секунд, в течение которых выполнялся переход | |
| embeds | Возвращает коллекцию всех тегов <embed> элементы документа | Document |
| encodeURI() | Кодирует URI | Global |
| encodeURIComponent() | Кодирует компонент URI | Global |
| E | Возвращает число Эйлера (прибл. 2.718) | Math |
| endsWith() | Проверяет, заканчивается ли строка указанной строкой/символами | String |
| entries() | Возвращает пару ключ/значение Объект итерации массива | Array |
| error() | Выводит сообщение об ошибке в консоль | Console |
| escape() | Устарело в версии 1.5. Используйте encodeURI() или encodeURIComponent() вместо этого | Global |
| eval() | Оценивает строку и выполняет ее, как если бы это был код скрипта | Global |
| eventPhase | Возвращает, какая фаза потока событий оценивается в данный момент | Event |
| every() | Проверяет, проходит ли тест каждый элемент массива | Array |
| exec() | Проверяет совпадение в строке. Возвращает первое совпадение | RegExp |
| execCommand() | Вызывает указанную операцию буфера обмена для элемента, который в данный момент находится в фокусе | Document |
| exitFullscreen() | Отменяет элемент в полноэкранном режиме | Element |
| exp(x) | Возвращает значение Ex | Math |
| expm1(x) | Возвращает значение Ex минус 1 | Math |
| export | Экспортируйте функции, чтобы их можно было использовать для импорта во внешние модули и другие скрипты | |
| extends | Расширяет класс (наследует) | Classes |
| dir | Задает или возвращает значение атрибута dir элемента | Element |
| fill() | Заполнить элементы массива статическим значением | Array |
| filter() | Создает новый массив с каждым элементом массива, прошедшим тест | Array |
| find() | Возвращает значение первого элемента массива, прошедшего проверку | Array |
| findIndex() | Возвращает индекс первого элемента массива, прошедшего проверку | Array |
| floor() | Возвращает x, округленное в меньшую сторону до ближайшего целого числа | Math |
| focus() | Дает фокус элементу | Element, Window |
| for | Помечает блок операторов для выполнения, пока условие истинно | Statements |
| for ... in | Помечает блок операторов, который будет выполняться для каждого элемента объекта (или массива) | Statements |
| forEach() | Вызывает функцию для каждого элемента массива | Array |
| forms | Возвращает коллекцию всех элементов <form> в документе | Document |
| forward() | Загружает следующий URL в списке истории | History |
| frameElement | Возвращает элемент <iframe>, в который вставляется текущее окно | Window |
| frames | Возвращает все <iframe> элементы в текущем окне | Window |
| from() | Создает массив из объекта | Array |
| fromCharCode() | Преобразует значения Unicode в символы | String |
| fround() | Возвращает ближайшее (32-разрядное одинарной точности) представление числа с плавающей запятой | Math |
| fullscreenElement | Возвращает текущий элемент, отображаемый в полноэкранном режиме | Document |
| fullscreenEnabled() | Возвращает логическое значение, указывающее, можно ли просматривать документ в полноэкранном режиме | Document |
| function | Объявляет функцию | Statements |
| geolocation | Возвращает объект геолокации, который можно использовать для определения местоположения пользователя | Navigator |
| getDate() | Возвращает день месяца (от 1 до 31) | Date |
| getDay() | Возвращает день недели (от 0 до 6) | Date |
| getAttribute() | Возвращает указанное значение атрибута узла элемента | Element |
| getAttributeNode() | Возвращает указанный узел атрибута | Element |
| getBoundingClientRect() | Возвращает размер элемента и его положение относительно окна просмотра | Element |
| getComputedStyle() | Получает текущие вычисленные стили CSS, примененные к элементу | Window |
| getCurrentPosition() | Возвращает текущую позицию устройства | Geolocation |
| getElementById() | Возвращает элемент, который имеет атрибут ID с указанным значением | Document |
| getElementsByClassName() | Возвращает NodeList, содержащий все элементы с указанным именем класса | Document, Element |
| getElementsByName() | Возвращает NodeList, содержащий все элементы с указанным именем | Document |
| getElementsByTagName() | Возвращает NodeList, содержащий все элементы с указанным именем тега | Document, Element |
| getFullYear() | Возвращает год | Date |
| getHours() | Возвращает час (от 0 до 23) | Date |
| getItem() | Возвращает значение указанного имени ключа | Storage |
| getMilliseconds() | Возвращает миллисекунды (от 0 до 999) | Date |
| getMinutes() | Возвращает минуты (от 0 до 59) | Date |
| getModifierState() | Возвращает массив, содержащий целевые диапазоны, которые будут затронуты вставка/удаление | MouseEvent |
| getMonth() | Возвращает месяц (от 0 до 11) | Date |
| getNamedItem() | Возвращает указанный узел атрибута из NamedNodeMap | Attribute |
| getSeconds() | Возвращает секунды (от 0 до 59) | Date |
| получитьВыбор() | Возвращает объект Selection, представляющий диапазон текста, выделенный пользователем | Window |
| getTargetRanges() | Возвращает массив, содержащий целевые диапазоны, которые будут затронуты вставкой/удалением | InputEvent |
| getTime() | Возвращает количество миллисекунд с полуночи 1 января 1970 года и указанную дату | Date |
| getTimezoneOffset() | Возвращает разницу во времени между временем UTC и местным временем в минутах | Date |
| getUTCDate() | Возвращает день месяца по всемирному времени (от 1 до 31) | Date |
| getUTCDay() | Возвращает день недели по всемирному времени (от 0 до 6) | Date |
| getUTCFullYear() | Возвращает год по всемирному времени | Date |
| getUTCHours() | Возвращает час по всемирному времени (от 0 до 23) | Date |
| getUTCMilliseconds() | Возвращает миллисекунды по всемирному времени (от 0 до 999) | Date |
| getUTCMinutes() | Возвращает минуты по всемирному времени (от 0 до 59) | Date |
| getUTCMonth() | Возвращает месяц по всемирному времени (от 0 до 11) | Date |
| getUTCSeconds() | Возвращает секунды по всемирному времени (от 0 до 59) | Date |
| getYear() | Устаревший. Используйте метод getFullYear() вместо этого | Date |
| global | Проверяет, установлен ли "g" модификатор | RegExp |
| go() | Загружает определенный URL-адрес из списка истории | History |
| group() | Создает новую встроенную группу в консоли. Это отступает следующие сообщения консоли на дополнительный уровень, пока не будет вызвано console.groupEnd() | Console |
| groupCollapsed() | Создает новую встроенную группу в консоли. Однако новая группа создается свернутой. Пользователю нужно будет использовать кнопку раскрытия, чтобы развернуть его | Console |
| groupEnd() | Выход из текущей встроенной группы в консоли | Console |
| hasAttribute() | Возвращает true, если элемент имеет указанный атрибут, иначе false | Element |
| hasAttributes() | Возвращает true, если элемент имеет какие-либо атрибуты, иначе false | Element |
| hasChildNodes() | Возвращает true, если у элемента есть дочерние узлы, иначе false | Element |
| hasFocus() | Возвращает логическое значение, указывающее, находится ли документ в фокусе | Document |
| hash | Sets or returns the anchor part (#) of a URL | Location |
| head | Returns the <head> element of the document | Document |
| height | Returns the total height of the screen | Screen |
| history | Returns the History object for the window (See History object) | Window |
| host | Sets or returns the hostname and port number of a URL | Location |
| hostname | Sets or returns the hostname of a URL | Location |
| href | Sets or returns the entire URL | Location |
| id | Sets or returns the value of the id attribute of an element | Element |
| if ... else ... else if | Marks a block of statements to be executed depending on a condition | Statements |
| ignoreCase | Checks whether the "i" modifier is set | RegExp |
| images | Returns a collection of all <img> elements in the document | Document |
| implementation | Returns the DOMImplementation object that handles this document | Document |
| import | Import functions exported from an external module, and another script | |
| importNode() | Imports a node from another document | Document |
| in | Returns true if the specified property is in the specified object, otherwise false | Operators |
| includes() | Check if an array contains the specified element | Array, String |
| indexOf() | Search the array for an element and returns its position | Array, String |
| Infinity | A numeric value that represents positive/negative infinity | Global |
| info() | Outputs an informational message to the console | Console |
| innerHeight | Returns the height of the window's content area (viewport) including scrollbars | Window |
| innerHTML | Sets or returns the content of an element | Element |
| innerText | Sets or returns the text content of a node and its descendants | Element |
| innerWidth | Returns the width of a window's content area (viewport) including scrollbars | Window |
| inputEncoding | Returns the encoding, character set, used for the document | Document |
| inputType | Returns the type of the change (i.e "inserting" or "deleting") | InputEvent |
| insertAdjacentElement() | Inserts a HTML element at the specified position relative to the current element | Element |
| insertAdjacentHTML() | Inserts a HTML formatted text at the specified position relative to the current element | Element |
| insertAdjacentText() | Inserts text into the specified position relative to the current element | Element |
| insertBefore() | Inserts a new child node before a specified, existing, child node | Element |
| instanceof | Returns true if the specified object is an instance of the specified object | Operators |
| isArray() | Checks whether an object is an array | Array |
| isComposing | Returns whether the state of the event is composing or not | InputEvent, KeyboardEvent |
| isContentEditable | Returns true if the content of an element is editable, otherwise false | Element |
| isDefaultNamespace() | Returns true if a specified namespaceURI is the default, otherwise false | Element |
| isEqualNode() | Checks if two elements are equal | Element |
| isFinite() | Determines whether a value is a finite, legal number | Global, Number |
| isId | Returns true if the attribute is of type Id, otherwise it returns false | Attribute |
| isInteger() | Checks whether a value is an integer | Number |
| isNaN() | Determines whether a value is an illegal number | Global, Number |
| isSafeInteger() | Checks whether a value is a safe integer | Number |
| isSameNode() | Checks if two elements are the same node | Element |
| isSupported() | Returns true if a specified feature is supported on the element | Element |
| isTrusted | Returns whether or not an event is trusted | Event |
| item() | Returns the attribute node at a specified index in a NamedNodeMap | Attribute, HTMLCollection |
| join() | Joins all elements of an array into a string | Array |
| key | Returns the key value of the key represented by the event | KeyboardEvent, StorageEvent |
| key() | Returns the name of the nth key in the storage | Storage |
| keyCode | Returns the Unicode character code of the key that triggered the onkeypress event, or the Unicode key code of the key that triggered the onkeydown or onkeyup event | KeyboardEvent |
| keys() | Returns a Array Iteration Object, containing the keys of the original array | Array |
| lang | Sets or returns the value of the lang attribute of an element | Element |
| language | Returns the language of the browser | Navigator |
| lastChild | Returns the last child node of an element | Element |
| lastElementChild | Returns the last child element of an element | Element |
| lastIndex | Specifies the index at which to start the next match | RegExp |
| lastIndexOf() | Search the array for an element, starting at the end, and returns its position | Array, String |
| lastModified | Returns the date and time the document was last modified | Document |
| length | Sets or returns the number of elements in an array | Array, Attribute, History, HTMLCollection, Window, Storage |
| lengthComputable | Returns whether the length of the progress can be computable or not | ProgressEvent |
| let | Declares a variable inside brackets {} scope | Statements |
| links | Returns a collection of all <a> and <area> elements in the document that have a href attribute | Document |
| LN2 | Returns the natural logarithm of 2 (approx. 0.693) | Math |
| LN10 | Returns the natural logarithm of 10 (approx. 2.302) | Math |
| loaded | Returns how much work has been loaded | ProgressEvent |
| localeCompare() | Compares two strings in the current locale | String |
| localStorage | Allows to save key/value pairs in a web browser. Stores the data with no expiration date | Window |
| location | Returns the location of a key on the keyboard or device | KeyboardEvent |
| location | Returns the Location object for the window (See Location object) | Window |
| log() | Returns the natural logarithm of a number | Math, Console |
| log10() | Returns the base-10 logarithm of a number | Math |
| log1p() | Returns the natural logarithm of 1 + a number | Math |
| log2() | Returns the base-2 logarithm of a number | Math |
| LOG2E | Returns the base-2 logarithm of E (approx. 1.442) | Math |
| LOG10E | Returns the base-10 logarithm of E (approx. 0.434) | Math |
| map() | Creates a new array with the result of calling a function for each array element | Array |
| match() | Searches a string for a match against a regular expression, and returns the matches | String |
| matches() | Returns a Boolean value indicating whether an element is matched by a specific CSS selector or not | Element |
| matchMedia() | Returns a MediaQueryList object representing the specified CSS media query string | Window |
| max() | Returns the number with the highest value | Math |
| MAX_VALUE | Returns the largest number possible in JavaScript | Number |
| message | Sets or returns an error message (a string) | Error |
| metaKey | Returns whether the "META" key was pressed when an event was triggered | MouseEvent, KeyboardEvent, TouchEvent |
| min() | Returns the number with the lowest value | Math |
| multiline | Checks whether the "m" modifier is set | RegExp |
| MIN_VALUE | Returns the smallest number possible in JavaScript | Number |
| moveBy() | Moves a window relative to its current position | Window |
| moveTo() | Moves a window to the specified position | Window |
| MovementX | Returns the horizontal coordinate of the mouse pointer relative to the position of the last mousemove event | MouseEvent |
| MovementY | Returns the vertical coordinate of the mouse pointer relative to the position of the last mousemove event | MouseEvent |
| name | Sets or returns an error name | Error, Attribute, Window |
| namedItem() | Returns the element with the specified ID, or name, in an HTMLCollection | HTMLCollection |
| namespaceURI | Returns the namespace URI of an element | Element |
| NaN | "Not-a-Number" value | Global, Number |
| navigator | Returns the Navigator object for the window (See Navigator object) | Window |
| NEGATIVE_INFINITY | Represents negative infinity (returned on overflow) | Number |
| new | Creates an instance of a constructor | |
| newURL | Returns the URL of the document, after the hash has been changed | HasChangeEvent |
| newValue | Returns the new value of the changed storage item | StorageEvent |
| nextSibling | Returns the next node at the same node tree level | Element |
| nextElementSibling | Returns the next element at the same node tree level | Element |
| nodeName | Returns the name of a node | Element |
| nodeType | Returns the node type of a node | Element |
| nodeValue | Sets or returns the value of a node | Element |
| normalize() | Removes empty Text nodes, and joins adjacent nodes | Document, Element |
| normalizeDocument() | Removes empty Text nodes, and joins adjacent nodes | Document |
| now() | Returns the number of milliseconds since midnight Jan 1, 1970 | Date |
| Number() | Converts an object's value to a number | Global |
| offsetHeight | Returns the height of an element, including padding, border and scrollbar | Element |
| offsetWidth | Returns the width of an element, including padding, border and scrollbar | Element |
| offsetLeft | Returns the horizontal offset position of an element | Element |
| offsetParent | Returns the offset container of an element | Element |
| offsetTop | Returns the vertical offset position of an element | Element |
| offsetX | Returns the horizontal coordinate of the mouse pointer relative to the position of the edge of the target element | MouseEvent |
| offsetY | Returns the vertical coordinate of the mouse pointer relative to the position of the edge of the target element | MouseEvent |
| oldURL | Returns the URL of the document, before the hash was changed | HasChangeEvent |
| oldValue | Returns the old value of the changed storage item | StorageEvent |
| onabort | The event occurs when the loading of a media is aborted | UiEvent, Event |
| onafterprint | The event occurs when a page has started printing, or if the print dialogue box has been closed | Event |
| onanimationend | The event occurs when a CSS animation has completed | AnimationEvent |
| onanimationiteration | The event occurs when a CSS animation is repeated | AnimationEvent |
| onanimationstart | The event occurs when a CSS animation has started | AnimationEvent |
| onbeforeprint | The event occurs when a page is about to be printed | Event |
| onbeforeunload | The event occurs before the document is about to be unloaded | UiEvent, Event |
| onblur | The event occurs when an element loses focus | FocusEvent |
| oncanplay | The event occurs when the browser can start playing the media (when it has buffered enough to begin) | Event |
| oncanplaythrough | The event occurs when the browser can play through the media without stopping for buffering | Event |
| onchange | The event occurs when the content of a form element, the selection, or the checked state have changed (for <input>, <select>, and <textarea>) | Event |
| onclick | The event occurs when the user clicks on an element | MouseEvent |
| oncontextmenu | The event occurs when the user right-clicks on an element to open a context menu | MouseEvent |
| oncopy | The event occurs when the user copies the content of an element | ClipboardEvent |
| oncut | The event occurs when the user cuts the content of an element | ClipboardEvent |
| ondblclick | The event occurs when the user double-clicks on an element | MouseEvent |
| ondrag | The event occurs when an element is being dragged | DragEvent |
| ondragend | The event occurs when the user has finished dragging an element | DragEvent |
| ondragenter | The event occurs when the dragged element enters the drop target | DragEvent |
| ondragleave | The event occurs when the dragged element leaves the drop target | DragEvent |
| ondragover | The event occurs when the dragged element is over the drop target | DragEvent |
| ondragstart | The event occurs when the user starts to drag an element | DragEvent |
| ondrop | The event occurs when the dragged element is dropped on the drop target | DragEvent |
| ondurationchange | The event occurs when the duration of the media is changed | Event |
| onemptied | The event occurs when something bad happens and the media file is suddenly unavailable (like unexpectedly disconnects) | |
| onended | The event occurs when the media has reach the end (useful for messages like "thanks for listening") | Event |
| onerror | The event occurs when an error occurs while loading an external file | ProgressEvent, UiEvent, Event |
| onfocus | The event occurs when an element gets focus | FocusEvent |
| onfocusin | The event occurs when an element is about to get focus | FocusEvent |
| onfocusout | The event occurs when an element is about to lose focus | FocusEvent |
| onfullscreenchange | The event occurs when an element is displayed in fullscreen mode | Event |
| onfullscreenerror | The event occurs when an element can not be displayed in fullscreen mode | Event |
| onhashchange | The event occurs when there has been changes to the anchor part of a URL | HashChangeEvent |
| oninput | The event occurs when an element gets user input | InputEvent, Event |
| oninvalid | The event occurs when an element is invalid | Event |
| onkeydown | The event occurs when the user is pressing a key | KeyboardEvent |
| onkeypress | The event occurs when the user presses a key | KeyboardEvent |
| onkeyup | The event occurs when the user releases a key | KeyboardEvent |
| onLine | Determines whether the browser is online | Navigator |
| onload | The event occurs when an object has loaded | UiEvent, Event |
| onloadeddata | The event occurs when media data is loaded | Event |
| onloadedmetadata | The event occurs when meta data (like dimensions and duration) are loaded | Event |
| onloadstart | The event occurs when the browser starts looking for the specified media | ProgressEvent |
| onmessage | The event occurs when a message is received through the event source | Event |
| onmousedown | The event occurs when the user presses a mouse button over an element | MouseEvent |
| onmouseenter | The event occurs when the pointer is moved onto an element | MouseEvent |
| onmouseleave | The event occurs when the pointer is moved out of an element | MouseEvent |
| onmousemove | The event occurs when the pointer is moving while it is over an element | MouseEvent |
| onmouseover | The event occurs when the pointer is moved onto an element, or onto one of its children | MouseEvent |
| onmouseout | The event occurs when a user moves the mouse pointer out of an element, or out of one of its children | MouseEvent |
| onmouseup | The event occurs when a user releases a mouse button over an element | MouseEvent |
| onmousewheel | Deprecated. Use the wheel event instead | WheelEvent |
| onoffline | The event occurs when the browser starts to work offline | Event |
| ononline | The event occurs when the browser starts to work online | Event |
| onopen | The event occurs when a connection with the event source is opened | Event |
| onpagehide | The event occurs when the user navigates away from a webpage | PageTransitionEvent |
| onpageshow | The event occurs when the user navigates to a webpage | PageTransitionEvent |
| onpaste | The event occurs when the user pastes some content in an element | ClipboardEvent |
| onpause | The event occurs when the media is paused either by the user or programmatically | Event |
| onplay | The event occurs when the media has been started or is no longer paused | Event |
| onplaying | The event occurs when the media is playing after having been paused or stopped for buffering | Event |
| onpopstate | The event occurs when the window's history changes | PopStateEvent |
| onprogress | The event occurs when the browser is in the process of getting the media data (downloading the media) | Event |
| onratechange | The event occurs when the playing speed of the media is changed | Event |
| onresize | The event occurs when the document view is resized | UiEvent, Event |
| onreset | The event occurs when a form is reset | Event |
| onscroll | The event occurs when an element's scrollbar is being scrolled | UiEvent, Event |
| onsearch | The event occurs when the user writes something in a search field (for <input="search">) | Event |
| onseeked | The event occurs when the user is finished moving/skipping to a new position in the media | Event |
| onseeking | The event occurs when the user starts moving/skipping to a new position in the media | Event |
| onselect | The event occurs after the user selects some text (for <input> and <textarea>) | UiEvent, Event |
| onshow | The event occurs when a <menu> element is shown as a context menu | Event |
| onstalled | The event occurs when the browser is trying to get media data, but data is not available | Event |
| onstorage | The event occurs when a Web Storage area is updated | StorageEvent |
| onsubmit | The event occurs when a form is submitted | Event |
| onsuspend | The event occurs when the browser is intentionally not getting media data | Event |
| ontimeupdate | The event occurs when the playing position has changed (like when the user fast forwards to a different point in the media) | Event |
| ontoggle | The event occurs when the user opens or closes the <details> element | Event |
| ontouchcancel | The event occurs when the touch is interrupted | TouchEvent |
| ontouchend | The event occurs when a finger is removed from a touch screen | TouchEvent |
| ontouchmove | The event occurs when a finger is dragged across the screen | TouchEvent |
| ontouchstart | The event occurs when a finger is placed on a touch screen | TouchEvent |
| ontransitionend | The event occurs when a CSS transition has completed | TransitionEvent |
| onunload | The event occurs once a page has unloaded (for <body>) | UiEvent, Event |
| onvolumechange | The event occurs when the volume of the media has changed (includes setting the volume to "mute") | Event |
| onwaiting | The event occurs when the media has paused but is expected to resume (like when the media pauses to buffer more data) | Event |
| onwheel | The event occurs when the mouse wheel rolls up or down over an element | WheelEvent |
| open() | Opens an HTML output stream to collect output from document.write() | Document, Window |
| opener | Returns a reference to the window that created the window | Window |
| origin | Returns the protocol, hostname and port number of a URL | Location |
| outerHeight | Returns the height of the browser window, including toolbars/scrollbars | Window |
| outerHTML | Sets or returns the outer content of an element | Element |
| outerText | Sets or returns the text outer content of a node and its descendants | Element |
| outerWidth | Returns the width of the browser window, including toolbars/scrollbars | Window |
| ownerDocument | Returns the root element (document object) for an element | Element |
| pageX | Returns the horizontal coordinate of the mouse pointer, relative to the document, when the mouse event was triggered | MouseEvent |
| pageXOffset | Returns the pixels the current document has been scrolled (horizontally) from the upper left corner of the window | Window |
| pageY | Returns the vertical coordinate of the mouse pointer, relative to the document, when the mouse event was triggered | MouseEvent |
| pageYOffset | Returns the pixels the current document has been scrolled (vertically) from the upper left corner of the window | Window |
| parent | Returns the parent window of the current window | Window |
| parentNode | Returns the parent node of an element | Element |
| parentElement | Returns the parent element node of an element | Element |
| parse() | Parses a date string and returns the number of milliseconds since January 1, 1970 | Date, JSON |
| parseFloat() | Parses a string and returns a floating point number | Global |
| parseInt() | Parses a string and returns an integer | Global |
| pathname | Sets or returns the path name of a URL | Location |
| persisted | Returns whether the webpage was cached by the browser | PageTransitionEvent |
| PI | Returns PI (approx. 3.14) | Math |
| pixelDepth | Returns the color resolution (in bits per pixel) of the screen | Screen |
| platform | Returns for which platform the browser is compiled | Navigator |
| pop() | Removes the last element of an array, and returns that element | Array |
| port | Sets or returns the port number of a URL | Location |
| position | Returns the position of the concerned device at a given time | Geolocation |
| positionError | Returns the reason of an error occurring when using the geolocating device | Geolocation |
| positionOptions | Describes an object containing option properties to pass as a parameter of Geolocation.getCurrentPosition() and Geolocation.watchPosition() | Geolocation |
| POSITIVE_INFINITY | Represents infinity (returned on overflow) | Number |
| preventDefault() | Cancels the event if it is cancelable, meaning that the default action that belongs to the event will not occur | Event |
| print() | Prints the content of the current window | Window |
| product | Returns the engine name of the browser | Navigator |
| propertyName | Returns the name of the CSS property associated with the animation or transition | AnimationEvent, TransitionEvent |
| protocol | Sets or returns the protocol of a URL | Location |
| prototype | Allows you to add properties and methods to an Array object | Array, Boolean, Date |
| pseudoElement | Returns the name of the pseudo-element of the animation or transition | AnimationEvent, TransitionEvent |
| push() | Adds new elements to the end of an array, and returns the new length | Array |
| querySelector() | Returns the first element that matches a specified CSS selector(s) in the document | Document, Element |
| querySelectorAll() | Returns a static NodeList containing all elements that matches a specified CSS selector(s) in the document | Document, Element |
| random() | Returns a random number between 0 and 1 | Math |
| readyState | Returns the (loading) status of the document | Document |
| reduce() | Reduce the values of an array to a single value (going left-to-right) | Array |
| reduceRight() | Reduce the values of an array to a single value (going right-to-left) | Array |
| referrer | Returns the URL of the document that loaded the current document | Document |
| region | MouseEvent | |
| reload() | Reloads the current document | Location |
| remove() | Removes the element from the DOM | Element |
| removeAttribute() | Removes a specified attribute from an element | Element |
| removeAttributeNode() | Removes a specified attribute node, and returns the removed node | Element |
| removeChild() | Removes a child node from an element | Element |
| removeEventListener() | Removes an event handler that has been attached with the addEventListener() method | Element |
| removeItem() | Removes that key from the storage | Storage |
| repeat | Returns whether a key is being hold down repeatedly, or not | KeyboardEvent |
| repeat() | Returns a new string with a specified number of copies of an existing string | String |
| replace() | Searches a string for a specified value, or a regular expression, and returns a new string where the specified values are replaced | String, Location |
| replaceChild() | Replaces a child node in an element | Element |
| requestAnimationFrame() | Requests the browser to call a function to update an animation before the next repaint | Window |
| requestFullscreen() | Shows an element in fullscreen mode | Element |
| resizeBy() | Resizes the window by the specified pixels | Window |
| resizeTo() | Resizes the window to the specified width and height | Window |
| return | Stops the execution of a function and returns a value from that function | Statements |
| reverse() | Reverses the order of the elements in an array | Array |
| round() | Rounds x to the nearest integer | Math |
| pow() | Returns the value of x to the power of y | Math |
| previousSibling | Returns the previous node at the same node tree level | Element |
| previousElementSibling | Returns the previous element at the same node tree level | Element |
| prompt() | Displays a dialog box that prompts the visitor for input | Window |
| prototype | Allows you to add properties and methods to an object | Number |
| relatedTarget | Returns the element related to the element that triggered the mouse event | MouseEvent, FocusEvent |
| removeEventListener() | Removes an event handler from the document (that has been attached with the addEventListener() method) | Document |
| removeNamedItem() | Removes a specified attribute node | Attribute |
| renameNode() | Renames the specified node | Document |
| screen | Returns the Screen object for the window (See Screen object) | Window |
| screenLeft | Returns the horizontal coordinate of the window relative to the screen | Window |
| screenTop | Returns the vertical coordinate of the window relative to the screen | Window |
| screenX | Returns the horizontal coordinate of the window/mouse pointer relative to the screen | Window, MouseEvent |
| screenY | Returns the vertical coordinate of the window/mouse pointer relative to the screen | Window, MouseEvent |
| scripts | Returns a collection of <script> elements in the document | Document |
| scroll() | Deprecated. This method has been replaced by the scrollTo() method. | Window |
| scrollBy() | Scrolls the document by the specified number of pixels | Window |
| scrollHeight | Returns the entire height of an element, including padding | Element |
| scrollIntoView() | Scrolls the specified element into the visible area of the browser window | Element |
| scrollLeft | Sets or returns the number of pixels an element's content is scrolled horizontally | Element |
| scrollTo() | Scrolls the document to the specified coordinates | Window |
| scrollTop | Sets or returns the number of pixels an element's content is scrolled vertically | Element |
| scrollWidth | Returns the entire width of an element, including padding | Element |
| scrollX | An alias of pageXOffset | Window |
| scrollY | An alias of pageYOffset | Window |
| search | Sets or returns the querystring part of a URL | Location |
| search() | Searches a string for a specified value, or regular expression, and returns the position of the match | String |
| self | Returns the current window | Window |
| sessionStorage | Allows to save key/value pairs in a web browser. Stores the data for one session | Window |
| setAttribute() | Sets or changes the specified attribute, to the specified value | Element |
| setAttributeNode() | Sets or changes the specified attribute node | Element |
| setDate() | Sets the day of the month of a date object | Date |
| setFullYear() | Sets the year of a date object | Date |
| setHours() | Sets the hour of a date object | Date |
| setInterval() | Calls a function or evaluates an expression at specified intervals (in milliseconds) | Window |
| setItem() | Adds that key to the storage, or update that key's value if it already exists | Storage |
| setMilliseconds() | Sets the milliseconds of a date object | Date |
| setMinutes() | Set the minutes of a date object | Date |
| setMonth() | Sets the month of a date object | Date |
| setNamedItem() | Sets the specified attribute node (by name) | Attribute |
| setSeconds() | Sets the seconds of a date object | Date |
| setTime() | Sets a date to a specified number of milliseconds after/before January 1, 1970 | Date |
| setTimeout() | Calls a function or evaluates an expression after a specified number of milliseconds | Window |
| setUTCDate() | Sets the day of the month of a date object, according to universal time | Date |
| setUTCFullYear() | Sets the year of a date object, according to universal time | Date |
| setUTCHours() | Sets the hour of a date object, according to universal time | Date |
| setUTCMilliseconds() | Sets the milliseconds of a date object, according to universal time | Date |
| setUTCMinutes() | Set the minutes of a date object, according to universal time | Date |
| setUTCMonth() | Sets the month of a date object, according to universal time | Date |
| setUTCSeconds() | Set the seconds of a date object, according to universal time | Date |
| setYear() | Deprecated. Use the setFullYear() method instead | Date |
| shift() | Removes the first element of an array, and returns that element | Array |
| shiftKey | Returns whether the "SHIFT" key was pressed when an event was triggered | MouseEvent, KeyboardEvent, TouchEvent |
| sign(x) | Returns the sign of a number (checks whether it is positive, negative or zero) | Math |
| sin() | Returns the sine of x (x is in radians) | Math |
| sinh() | Returns the hyperbolic sine of x | Math |
| slice() | Selects a part of an array, and returns the new array | Array, String |
| some() | Checks if any of the elements in an array pass a test | Array |
| sort() | Sorts the elements of an array | Array |
| source | Returns the text of the RegExp pattern | RegExp |
| specified | Returns true if the attribute has been specified, otherwise it returns false | Attribute |
| splice() | Adds/Removes elements from an array | Array |
| split() | Splits a string into an array of substrings | String |
| static | Defines a static method for a class | Classes |
| startsWith() | Checks whether a string begins with specified characters | String |
| state | Returns an object containing a copy of the history entries | PopStateEvent |
| String() | Converts an object's value to a string | Global |
| stop() | Stops the window from loading | Window |
| stopImmediatePropagation() | Prevents other listeners of the same event from being called | Event |
| stopPropagation() | Prevents further propagation of an event during event flow | Event |
| stringify() | Convert a JavaScript object to a JSON string | JSON |
| sqrt() | Returns the square root of x | Math |
| SQRT1_2 | Returns the square root of 1/2 (approx. 0.707) | Math |
| SQRT2 | Returns the square root of 2 (approx. 1.414) | Math |
| status | Sets or returns the text in the statusbar of a window | Window |
| strictErrorChecking | Sets or returns whether error-checking is enforced or not | Document |
| storageArea | Returns an object representing the affected storage object | StorageEvent |
| style | Sets or returns the value of the style attribute of an element | Element |
| substr() | Extracts the characters from a string, beginning at a specified start position, and through the specified number of character | String |
| substring() | Extracts the characters from a string, between two specified indices | String |
| super | Refers to the parent class | Classes |
| switch | Marks a block of statements to be executed depending on different cases | Statements |
| table() | Displays tabular data as a table | Console |
| tabIndex | Sets or returns the value of the tabindex attribute of an element | Element |
| tagName | Returns the tag name of an element | Element |
| tan() | Returns the tangent of an angle | Math |
| tanh() | Returns the hyperbolic tangent of a number | Math |
| target | Returns the element that triggered the event | Event |
| targetTouches | Returns a list of all the touch objects that are in contact with the surface and where the touchstart event occured on the same target element as the current target element | TouchEvent |
| test() | Tests for a match in a string. Returns true or false | RegExp |
| textContent | Sets or returns the textual content of a node and its descendants | Element |
| this | Refers to the object it belongs to | |
| throw | Throws (generates) an error | Statements |
| time() | Starts a timer (can track how long an operation takes) | Console |
| timeEnd() | Stops a timer that was previously started by console.time() | Console |
| timeStamp | Returns the time (in milliseconds relative to the epoch) at which the event was created | Event |
| title | Sets or returns the title of the document | Document, Element |
| toDateString() | Converts the date portion of a Date object into a readable string | Date |
| toGMTString() | Deprecated. Use the toUTCString() method instead | Date |
| toExponential() | Converts a number into an exponential notation | Number |
| toFixed(x) | Formats a number with x numbers of digits after the decimal point | Number |
| toJSON() | Returns the date as a string, formatted as a JSON date | Date |
| toISOString() | Returns the date as a string, using the ISO standard | Date |
| toLocaleDateString() | Returns the date portion of a Date object as a string, using locale conventions | Date |
| toLocaleLowerCase() | Converts a string to lowercase letters, according to the host's locale | String |
| toLocaleString() | Converts a Date object to a string, using locale conventions | Date |
| toLocaleTimeString() | Returns the time portion of a Date object as a string, using locale conventions | Date |
| toLocaleUpperCase() | Converts a string to uppercase letters, according to the host's locale | String |
| toLowerCase() | Converts a string to lowercase letters | String |
| top | Returns the topmost browser window | Window |
| toPrecision(x) | Formats a number to x length | Number |
| toString() | Converts an array to a string, and returns the result | Array, Boolean, Date, Number, RegExp, String, Element |
| total | Returns the total amount of work that will be loaded | ProgressEvent |
| toTimeString() | Converts the time portion of a Date object to a string | Date |
| touches | Returns a list of all the touch objects that are currently in contact with the surface | TouchEvent |
| toUpperCase() | Converts a string to uppercase letters | String |
| toUTCString() | Converts a Date object to a string, according to universal time | Date |
| trace() | Outputs a stack trace to the console | Console |
| transitionend | The event occurs when a CSS transition has completed | TransitionEvent |
| trim() | Removes whitespace from both ends of a string | String |
| trunc() | Returns the integer part of a number (x) | Math |
| try ... catch ... finally | Marks the block of statements to be executed when an error occurs in a try block, and implements error handling | Statements |
| type | Returns the name of the event | Event |
| typeof | Returns the type of a variable, object, function or expression | Operators |
| undefined | Indicates that a variable has not been assigned a value | Global |
| unescape() | Deprecated in version 1.5. Use decodeURI() or decodeURIComponent() instead | Global |
| unshift() | Adds new elements to the beginning of an array, and returns the new length | Array |
| url | Returns the URL of the changed item's document | StorageEvent |
| URL | Returns the full URL of the HTML document | Document |
| userAgent | Returns the user-agent header sent by the browser to the server | Navigator |
| UTC() | Returns the number of milliseconds in a date since midnight of January 1, 1970, according to UTC time | Date |
| value | Sets or returns the value of the attribute | Attribute |
| valueOf() | Returns the primitive value of an array | Array, Boolean, Date, Number, String |
| var | Declares a variable | Statements |
| warn() | Outputs a warning message to the console | Console |
| watchPosition() | Returns a watch ID value that then can be used to unregister the handler by passing it to the Geolocation.clearWatch() method | Geolocation |
| which | Returns which mouse button was pressed when the mouse event was triggered | MouseEvent, KeyboardEvent |
| width | Returns the total width of the screen | Screen |
| view | Returns a reference to the Window object where the event occurred | UiEvent |
| void | Evaluates an expression and returns undefined | Operators |
| while | Marks a block of statements to be executed while a condition is true | Statements |
| write() | Writes HTML expressions or JavaScript code to a document | Document |
| writeln() | Same as write(), but adds a newline character after each statement | Document |
| yield | Pauses and resumes a generator function | Operators |
JavaScript Tutorial
Visit Our JavaScript Tutorial »

