Home Cooker Classes Others Rice CookerGX
Classes  >  element  >  SetAttribute(string,string)
element class : SetAttribute(string,string) method

Description

Sets the value of the specified attribute.

Syntax

elementInstance.SetAttribute(string attributeName, string attributeValue)

Arguments

ClassNameDescription
stringattributeNameAttribute name.
stringattributeValueAttribute value.

Return value

None

Sample code

string attributeName = "width";

string attributeValue = "100px";

anyElement.SetAttribute(attributeName, attributeValue);

Notes

It's a wrapper of the MSHTML.IHTMLElement5.setAttribute(String,Object).

Links for reference

Copyright © Rice All rights reserved.