js attributes

This commit is contained in:
Alexander Popov 2023-10-09 01:28:48 +03:00
parent 0713b75cde
commit 498da7474c
1 changed files with 4 additions and 0 deletions

View File

@ -0,0 +1,4 @@
elem.hasAttribute(name) // проверяет наличие атрибута.
elem.getAttribute(name) // получает значение атрибута.
elem.setAttribute(name, value) // устанавливает значение атрибута.
elem.removeAttribute(name) // удаляет атрибут.