Image.DescriptionUrl 屬性

定義

取得或設定影像詳細說明的位置。Gets or sets the location to a detailed description for the image.

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

屬性值

String

含有影像詳細說明之檔案的 URL。The URL for the file that contains a detailed description for the image. 預設為空字串 ("")。The default is an empty string ("").

備註

DescriptionUrl屬性會指定 HTML 檔案,以提供影像的其他詳細資料。The DescriptionUrl property specifies an HTML file that provides additional details for the image. 屬性會轉譯 DescriptionUrllongdesc 影像控制項的屬性。The DescriptionUrl property renders as the longdesc attribute for the image control. 如果 DescriptionUrl 未設定屬性,或將屬性設為空字串 ( "" ) ,則 Image 不使用屬性來呈現控制項 longdescIf the DescriptionUrl property is not set, or is set to an empty string (""), the Image control renders without the longdesc attribute.

DescriptionUrl 可以使用屬性來補充 AlternateText 屬性。Use the DescriptionUrl property to supplement the AlternateText property. 例如,如果您使用 Image 控制項來顯示日光系統的影像,則可以將 AlternateText 屬性設定為 The Solar System, ,然後將 DescriptionUrl 屬性設定為 HTML 頁面,以進一步描述太陽系在日光系統中軌道太陽的行星影像。For example, if you use an Image control to display an image of the solar system, you can set the AlternateText property to The Solar System, and then set the DescriptionUrl property to an HTML page that further describes the image of planets orbiting the sun in the solar system.

DescriptionUrl屬性是選擇性的,但它可以增強網頁的可存取性,讓您能夠存取純文字瀏覽器和螢幕瀏覽器的網頁。The DescriptionUrl property is optional, but it can enhance the accessibility of your Web page for text-only browsers and screen readers. 瀏覽器可以使用詳細的文字描述來傳達重要的概念,以取代視覺效果影像。Browsers can use the detailed text description to convey important concepts in place of, or in addition to, the visual image. 請參閱您的瀏覽器檔,以取得其如何使用屬性所指定的描述性內容的詳細資料 longdescRefer to your browser documentation for details on how it uses the descriptive content specified by the longdesc attribute.

適用於

另請參閱