function createXMLHttpRequest()
{
if(window.XMLHttpRequest)
{
xmlHttp = new XMLHttpRequest();
}
else if (window.ActiveXObject)
{
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
}
{
if(window.XMLHttpRequest)
{
xmlHttp = new XMLHttpRequest();
}
else if (window.ActiveXObject)
{
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
}
解决方案 »
- 【求助】用JQ或者JS 写一个指定获取当前tr的复选框
- 探讨一下JS对象实现继承的办法
- JS字符串连接与自动获取服务器IP问题
- dom元素(或者是img元素)能否旋转(或者倾斜)?
- 高手请进!!document.getElementById()和document.getElementsByName()的区别
- 从一字符串中得出IP:端口,用正则更好
- 在javascript中如何实现跳转到另一个网页
- 怎样将字符串转换为整型数进行加减运算?
- 怎么去除或者替换JS变量中最后一个字符?
- 可否在客户端用JS修改某个文件的缓存参数呢?
- FCKeditor HTML 在线编辑器 JAVA 版 使用小记
- 在JS中,时间如何相加谢谢大家
var xmlhttp;
function createXMLHttp()
{
if(window.XMLHttpRequest)
{
xmlhttp = new XMLHttpRequest();// 在非Microsoft浏览器中创建XMLHttpRequest对象
}
else if(window.ActiveXObject)
{
try{
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");//尝试按老版InternetExplorer方法创建
}
catch(e1){
try{
xmlhttp= new ActiveXObject("Msxml2.XMLHTTP");// 尝试按新版InternetExplorer方法创建
}
catch(e2)
{
alert("创建XMLHttpRequest对象失败.");
}
}
}
}
</script>
自己去找一下...
我忘了...
var oXmlDom = document.implementation.createDocument("", "", null);
然后就可以load()...
字符串形式的话要用DOMParser...
相关的自己去找...
然后就可以load()...
字符串形式的话要用DOMParser...如果实在不行,看一些相关的书籍
http://book.csdn.net/bookfiles/46/100466986.shtml