在非IE浏览器里使用XMLDOM
document.implementation.createDocument("", "" null);
document.implementation.createDocument("", "" null);
解决方案 »
- 急求帮忙解决浮动广告的浏览器兼容性问题
- 关于GET和POST的问题
- 弹出选择文件夹对话框的按钮
- JS数据传入方式类似,却造成图形有的无图,有的显示,求大家帮助!
- document.writeln隐藏层怎么不隐藏了,用HTML直接用就隐藏?
- 急,小弟,我想用正则表达式来检查我输入的text的内容是否是5位的数字型(0-9),只能是5位
- 请求文档
- 时间输入 源程序
- 怎样实现javascript在浏览器上连续输出内容~!??document.write,innerHTML都不行
- window.event.srcElement.id 在mozzilla & nn6中的替换方式
- 请教文本框自动赋值问题???谢谢
- 关于window.location.search
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<script language="javascript" type="text/javascript">
<!--
if ( window.XMLHttpRequest ) // Gecko
oXmlHttp = new XMLHttpRequest() ;
else if ( window.ActiveXObject ) // IE
oXmlHttp = new ActiveXObject("MsXml2.XmlHttp") ;
urlToCall = "http://www.google.com/";
var bAsync = 1 ;
//打开url
oXmlHttp.open( "POST", urlToCall, bAsync ) ;
oXmlHttp.setRequestHeader( "CONTENT-TYPE","application/x-www-form-urlencoded");
params = 'item_button=45&topic=5';
//发送测试
oXmlHttp.send(params) ;
//测试返回结果
oXmlHttp.onreadystatechange = function()
{
if ( oXmlHttp.readyState == 4 )
{
result += oXmlHttp.responseText; //你可以自行换成oXmlHttp.responseXML,那么就是xml对象了。
}
}
alert(result);
//-->
</script>
</head><body></body>
</html>
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<script language="javascript" type="text/javascript">
<!--
if ( window.XMLHttpRequest ) // Gecko
oXmlHttp = new XMLHttpRequest() ;
else if ( window.ActiveXObject ) // IE
oXmlHttp = new ActiveXObject("MsXml2.XmlHttp") ;urlToCall = "http://www.csdn.net/";
var bAsync = 1 ;
var result = '';
//打开url
oXmlHttp.open( "POST", urlToCall, bAsync ) ;
//oXmlHttp.setRequestHeader( "CONTENT-TYPE","application/x-www-form-urlencoded");
params = 'item_button=45&topic=5';
//发送测试
oXmlHttp.send(null) ;
//测试返回结果
oXmlHttp.onreadystatechange = function()
{
if ( oXmlHttp.readyState == 4 )
{
result = oXmlHttp.responseText; //你可以自行换成oXmlHttp.responseXML,那么就是xml对象了。
alert(result);
}
}//-->
</script>
</head><body></body>
</html>