DOM 有多个层次。是否有用于 JavaScript 的 DOM API 可以在运行时检测当前执行引擎支持的最高 DOM 级别?
最佳答案
if(document.implementation){
if(document.implementation.hasFeature('Core','2.0')){
alert('DOM2 Core supported');
}else{
alert('DOM2 Core not supported');
}
}
关于javascript - 检测 JavaScript 中的 DOM 级别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41822751/