判断是否支持html5

方法一,

<script> function checkhHtml5() {   if (typeof(Worker) !== "undefined") {   alert("支持HTML5");   }  else {  alert("不支持HTML5");   } } </script>
方法二,

<canvas id="Canvas" ></canvas>

<script>
    if (!document.getElementById("Canvas").getContext) {
        alert("不支持html5");
    }
    else{
	alert("支持html5");
	}
</script>
原文地址:https://www.cnblogs.com/xgbzsc/p/2611350.html