Thuộc tính popovertargetaction HTML <input>
Ví dụ
Khi nhấp vào nút nhập, phần tử bật lên sẽ hiển thị:
<h1 popover id="myheader">Hello</h1>
<input type="button" popovertarget="myheader" popovertargetaction="show" value="Click me!">
Hãy tự mình thử »Định nghĩa và cách sử dụng
Thuộc tính popovertargetaction
cho phép bạn xác định điều gì sẽ xảy ra khi bạn nhấp vào nút.
Bạn có thể chọn giữa các giá trị "hiển thị", "ẩn" và "chuyển đổi".
Xin chào
popovertargetaction
chỉ hoạt động khi gõ = "nút".
Nếu thuộc tính popovertargetaction
không được chỉ định, giá trị "chuyển đổi" mặc định sẽ được sử dụng.
Hỗ trợ trình duyệt
Attribute | |||||
---|---|---|---|---|---|
popovertargetaction | 114 | 114 | Not supported | 17 | 100 |
Cú pháp
<input type="button" popovertarget=" element_id popovertargetaction="hide|show|toggle"">
Giá trị thuộc tính
Value | Description | |
---|---|---|
hide | The popover element is hidden when you click the button | Try it » |
show | The popover element is showed when you click the button | Try it » |
toggle | Default value. The popover element is toggled between hidding and showing when you click the button | Try it » |
Trang liên quan
Thuộc tính cửa sổ bật lên HTML
Thuộc tính popovertarget đầu vào HTML