HTMLButtonElement: phương thức setCustomValidity()
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.
Phương thức setCustomValidity() của giao diện HTMLButtonElement đặt thông báo hợp lệ tùy chỉnh cho phần tử. Dùng chuỗi rỗng để cho biết phần tử không có lỗi hợp lệ tùy chỉnh.
Cú pháp
js
setCustomValidity(string);
Đặc tả kỹ thuật
| Specification |
|---|
| HTML> # dom-cva-setcustomvalidity-dev> |