兼容之ajax

xiaoxiao2021-02-28  107

1、XMLHttpRequest

区别:ie7+及及其浏览器 与 ie5,6的兼容 解决

var xhr; if (window.XMLHttpRequest) { xhr = new XMLHttpRequest(); } else { xhr = new ActiveXObject("Microsoft.XMLHTTP");//ie5,6的写法 }
转载请注明原文地址: https://www.6miu.com/read-68429.html

最新回复(0)