次の方法で共有


HtmlElement.RemoveAttribute Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Removes an attribute from the current HTML element.

Namespace:  System.Windows.Browser
Assembly:  System.Windows.Browser (in System.Windows.Browser.dll)

Syntax

'Declaration
Public Sub RemoveAttribute ( _
    name As String _
)
public void RemoveAttribute(
    string name
)

Parameters

Exceptions

Exception Condition
ArgumentException

name is an empty string.

ArgumentNullException

name is nulla null reference (Nothing in Visual Basic).

Remarks

No action is taken if the attribute that is identified by name does not exist on the current HTML element.

In Firefox, the attribute is not removed; instead, its value is set to nulla null reference (Nothing in Visual Basic).

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.