HTMLEmbedElement: thuộc tính src
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Thuộc tính src của giao diện HTMLEmbedElement trả về một chuỗi cho biết URL của tài nguyên đang được nhúng.
Nó phản ánh thuộc tính src của phần tử <embed>.
Giá trị
Một chuỗi.
Ví dụ
html
<embed
id="el"
type="video/quicktime"
src="movie.mov"
width="640"
height="480"
title="Title of my video" />
js
const el = document.getElementById("el");
console.log(el.src); // Kết quả: "movie.mov"
Thông số kỹ thuật
| Thông số kỹ thuật |
|---|
| HTML> # dom-embed-src> |