getElementAttribute

Gets the value of the specified attribute of the specified element

Syntax

getElementAttribute = function(aElement, aAttribute);

Parameters

  • aElement
    • functions: element
  • aAttribute
    • functions: attribute value of which must be obtained

Returned value

  • functions: attribute value

Examples

  1. //Loading page google.ru
    loadURI('google.ru');
    //Get the element (request input field)
    var element = getElement('input',0,['class','id'],['gbqfif','gbqfq'],true);
    //Get the value of the attribute "name" of element
    var nm = getElementAttribute(element,'name');