我在上一篇文章中找到了以下内容,但需要一些帮助:
// For VML detection, here's what google maps does (search for "function Xd"):
function supportsVml() {
if (typeof supportsVml.supported == "undefined") {
var a = document.body.appendChild(document.createElement('div'));
a.innerHTML = '<v:shape id="vml_flag1" adj="1" />';
var b = a.firstChild;
b.style.behavior = "url(#default#VML)";
supportsVml.supported = b ? typeof b.adj == "object": true;
a.parentNode.removeChild(a);
}
return supportsVml.supported;
}
当不支持 VML 时,我想使用该代码将用户转移到替代页面。请有人告诉我如何编写和实现代码以转移到一个名为alternative.html的页面。
我有一些javascript知识,但不是这个级别!
谢谢。