Содержание

setElementsAttribute

Sets the specified attribute of the specified elements to the specified value.

Syntax

setElementsAttribute = function(aElements, aAttribute, aValue);

Parameters

Examples

  1. //Loading page google.ru
    loadURI('google.ru');
    //Get elements
    var elements = getElement('input');
    //Set the value of the attribute "class" of all elements equal to "MyClass"
    setElementsAttribute(elements,'class','MyClass');