方法一:

<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