判断webkit中的js引擎是否是v8
<html>
<head>
</head>
<body>
<script type="text/javascript">
if (window.devicePixelRatio) { //If WebKit browser
var st = escape(navigator.javaEnabled.toString());
if (st === 'function%20javaEnabled%28%29%20%7B%20%5Bnative%20code%5D%20%7D') {
document.write('V8 detected');
} else {
document.write('other');
}
} else {
document.write("Not a WebKit browser");
}
</script>
</body>
</html>