Related introduction:
We know that usually, the DOMContentLoaded event is executed before window.onload. When the DOM tree construction is completed, the DOMContentLoaded event will be executed. And window.onload is executed when the page is loaded, including pictures and other elements.
(Learning video sharing: html5 video tutorial)
Usually we just want to bind events to elements after the DOM tree is built. We don’t need picture elements. And sometimes the loading speed of external domain images is very slow.
Implementation code:
Implementation effect:
Related recommendations: html5 tutorial
The above is the detailed content of HTML5 implements the function of calling the camera and taking pictures. For more information, please follow other related articles on the PHP Chinese website!