HTMLBaseElement: target property

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 target của giao diện HTMLBaseElement là một chuỗi đại diện cho tab đích mặc định để hiển thị kết quả đầu ra cho các siêu liên kết và phần tử biểu mẫu.

Nó phản ánh thuộc tính target của phần tử <base>.

Giá trị

Một chuỗi đại diện cho đích. Giá trị của nó có thể là:

Ví dụ

html
<head>
  <base target="_top" />
</head>
js
const baseElement = document.getElementsByTagName("base")[0];
console.log(baseElement.target); // Output: '_top'

Thông số kỹ thuật

Thông số kỹ thuật
HTML
# dom-base-target

Tương thích trình duyệt

Xem thêm