如何在 HTML5 檢測網頁瀏覽器支援
您可以嘗試執行以下程式碼,來檢測 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>以下是結果

廣告
資料結構
網路
關係型資料庫管理系統
作業系統
Java
iOS
HTML
CSS
Android
Python
C 程式語言
C++
C#
MongoDB
MySQL
Javascript
PHP