如何检查HTML5中的Web浏览器支持
您可以尝试运行以下代码来检测Web浏览器中可用的Web Worker功能:
<!DOCTYPE HTML><html>
<head>
<title>Big for loop</title>
<script src = "/js/modernizr-1.5.min.js"></script>
<script>
function myFunction(){
if (Modernizr.webworkers) {
alert("Congratulations!! You have web workers support." );
} else{
alert("Sorry!! You do not have web workers support." );
}
}
</script>
</head>
<body>
<button onclick = "myFunction()">Click me</button>
</body>
</html>
以上是 如何检查HTML5中的Web浏览器支持 的全部内容, 来源链接: utcz.com/z/343231.html