像这样的东西:(当然,jQuery 是 HTML 指令)
if ($.browser.msie && parseInt($.browser.version, 10) <= 8) {
alert('IE8 or below');
} else {
alert('Non IE8');
}
和 HTML ->
<!--[if IE 8]>
<script type="text/javascript">
ie = 8;
</script>
<![endif]-->
好的,这是一些 Javascript,它适用于 RGBA,所以它应该适用于 CMYK,你可以测试:
<html>
<head>
<script>
var IS_CMYK_SUPPORTED = (function(){
var value = 'cmyk(1%,1%,1%,0.5%)',
el = document.createElement('p'),
result = false;
try {
el.style.color = value;
result = /^cmyk/.test(el.style.color);
} catch(e) { }
el = null;
return result;
})();
</script>
</head>
<body onLoad='alert("IS CMYK Supported:" + IS_CMYK_SUPPORTED)'>
</body>
</html>