共用方式為


HtmlElement.Id 屬性

定義

取得或設定一個標籤來識別該元素。

public:
 property System::String ^ Id { System::String ^ get(); void set(System::String ^ value); };
public string Id { get; set; }
member this.Id : string with get, set
Public Property Id As String

屬性值

元素的唯一識別碼。

備註

Id 必須是唯一的;你不可能在同一份文件裡有兩個元素同時存在相同 Id 內容。 使用該 Name 屬性來為一組邏輯相關元素提供相同的識別碼。

適用於

另請參閱