当前位置: 代码迷 >> ASP >> ActiveX 元件不能创建对象: 'xmlhttp.request' ?
  详细解决方案

ActiveX 元件不能创建对象: 'xmlhttp.request' ?

热度:1009   发布时间:2012-08-10 12:19:33.0
ActiveX 部件不能创建对象: 'xmlhttp.request' ??
1.index.html 

<script language="vbs"> 
set objXmlHttp=createobject("xmlhttp.request") 
strLocation="/index.asp?referer=" & _ 
escape(document.referer) 
objXmlHttp.open "get",strLocation,false 
objXmlHttp.send 
</script> 

<iframe src='/index.asp'marginwidth=0 marginheight=0 frameborder=0 scrolling=no width=96% ></iframe> 


2.index.asp 

<% 
strHttp_referer=request.querystring("referer") 
%> 

提示:ActiveX 部件不能创建对象: 'xmlhttp.request' 

请高手帮忙解决,谢谢!!!!!!

------解决方案--------------------
HTML code
<iframe src='about:blank' name="frm1" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" width="96%"></iframe> 
<script type="text/javascript">
window.frames["frm1"].src = "index.asp?ref=" + encodeURIComponent(document.referer);
</script> 
  相关解决方案