Movatterモバイル変換


[0]ホーム

URL:


MDN Web Docs

HTMLMediaElement: src property

BaselineWidely available

TheHTMLMediaElement.src property reflects the value ofthe HTML media element'ssrc attribute, which indicates the URL of a mediaresource to use in the element.

Note:The best way to know the URL of the media resource currentlyin active use in this element is to look at the value of thecurrentSrc attribute, which also takesinto account selection of a best or preferred media resource from a list provided inanHTMLSourceElement (which represents a<source>element).

Value

A string containing the URL of a media resource to use in theelement; this property reflects the value of the HTML element'ssrcattribute.

Examples

js
const obj = document.createElement("video");console.log(obj.src); // ""

Specifications

Specification
HTML
# dom-media-src

Browser compatibility

See also

Help improve MDN

Learn how to contribute.

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp