Example
myVid=document.getElementById("video1"); myVid.controls=true;
Definition and Usage
controls property is set or returned to the browser Standard audio and video controls should be displayed.
Standard audio and video controls include:
Play
Pause
Volume
Full screen switch (for video)
Subtitles (when available)
Tracks (when available)
audio|video.controls=true|false
audio|video.controls
Description | |
Indicates the display control. | |
Default. Indicates that the control is not displayed. |
Boolean value. true|false | |
false |
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> </head> <body> <form action="" method="post"> <label id="label"> 邮编: <input type="text" name="text"value="" maxlength="6"> <small>请输入六位数字</small> </label> <input type="button" value="设置默认值" onclick="setValue()"> </form> <script type="text/javascript"> function setValue(){ var label = document.getElementById('label'); var textbox = label.control; textbox.value='10010'; } </script> </body> </html>
The above is the detailed content of In HTML5, set or return the attribute controls that the browser should display standard audio and video controls.. For more information, please follow other related articles on the PHP Chinese website!