SVGStyleElement: thuộc tính type
Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
Thuộc tính SVGStyleElement.type trả về loại của style hiện tại.
Giá trị phản ánh thuộc tính type của phần tử SVG <style> liên kết.
Các tác giả không nên sử dụng thuộc tính này hoặc dựa vào giá trị.
Giá trị
Các giá trị được phép là một chuỗi rỗng hoặc một kết quả khớp không phân biệt chữ hoa chữ thường cho "text/css".
Ngoại lệ
SVG 1.1 định nghĩa rằng một DOMException được ném ra với mã NO_MODIFICATION_ALLOWED_ERR khi cố gắng thay đổi giá trị của thuộc tính chỉ đọc.
Hạn chế này đã được loại bỏ trong SVG 2.
Thông số kỹ thuật
| Thông số kỹ thuật |
|---|
| Scalable Vector Graphics (SVG) 2> # __svg__SVGStyleElement__type> |