使用IE6和ActiveX的ActiveX警告IE7 [英] ActiveX warning with IE6 & IE7
本文介绍了使用IE6和ActiveX的ActiveX警告IE7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在W3School上试用XSLT示例 http://www.w3schools.com/xsl/xsl_client.asp
我的textXSLT.html
| < html > |
| < head > |
| < < font style ="font-size:11px"> script > |
| 功能loadXMLDoc(fname) |
| { |
| var xml文件; |
| |
| if(window.ActiveXObject)// IE的代码 |
| { |
| xmlDoc = new 的ActiveXObject(QUOT; Microsoft.XMLDOM"); |
| } |
| 否则如果( document.implementation |
| && document。 implementation.createDocument)// Mozilla,Firefox,Opera等的代码。 |
| { |
| xmlDoc = document 。implementation.createDocument("","",null); |
| } |
| else |
| { |
| alert('您的浏览器无法处理此脚本"); |
| } |
| xmlDoc.async = false ; |
| xmlDoc.load(FNAME); |
| return(xmlDoc); |
| } |
| |
| function displayResult() |
| { |
| xml = loadXMLDoc (" HTTP://www.w3schools.com/xsl/cdcatalog.xml"); |
| < font style ="color:red"> xsl = loadXMLDoc (" cdcatalog.xsl"); |
| |
| //代码IE |
| if(window.ActiveXObject) |
| { |
| ex = xml .transformNode(xsl); |
| document.getElementById(" ;示例") 。innerHTML = ex ; |
| } |
| //代码适用于Mozilla,Firefox,Opera等。 |
| 否则if(document.implementation |
| && document.implementation.createDocument) |
| { |
| xsltProcessor = new XSLTProcessor(); |
| xsltProcessor.importStylesheet(XSL); |
| resultDocument = xsltProcessor transformToFragment(XML,文档); |
| 的document.getElementById(QUOT;实施例")的appendChild(resultDocument); |
| } |
| } |
| < ; / script > |
| < / head > |
| < body id = " example" onLoad = " displayResult()" > |
| < / body > |
| < / html > |
解决方案
此论坛是关于Office Live的问题。你最好的选择是将这个问题发布在Internet Explorer新闻组的 http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.internetexplorer.general 。搜索结果,罗伯特
I try XSLT example at W3School http://www.w3schools.com/xsl/xsl_client.asp
My textXSLT.html
<html> | |
<head> | |
<script> | |
function loadXMLDoc(fname) | |
{ | |
var xmlDoc; | |
if (window.ActiveXObject) // code for IE | |
{ | |
xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); | |
} | |
else if (document.implementation | |
&& document.implementation.createDocument) // code for Mozilla, Firefox, Opera, etc. | |
{ | |
xmlDoc=document.implementation.createDocument("","",null); | |
} | |
else | |
{ | |
alert('Your browser cannot handle this script'); | |
} | |
xmlDoc.async=false; | |
xmlDoc.load(fname); | |
return(xmlDoc); | |
} | |
function displayResult() | |
{ | |
xml=loadXMLDoc("http://www.w3schools.com/xsl/cdcatalog.xml"); | |
xsl=loadXMLDoc("cdcatalog.xsl"); | |
// code for IE | |
if (window.ActiveXObject) | |
{ | |
ex=xml.transformNode(xsl); | |
document.getElementById("example").innerHTML=ex; | |
} | |
// code for Mozilla, Firefox, Opera, etc. | |
else if (document.implementation | |
&& document.implementation.createDocument) | |
{ | |
xsltProcessor=new XSLTProcessor(); | |
xsltProcessor.importStylesheet(xsl); | |
resultDocument = xsltProcessor.transformToFragment(xml,document); | |
document.getElementById("example").appendChild(resultDocument); | |
} | |
} | |
</script> | |
</head> | |
<body id="example" onLoad="displayResult()"> | |
</body> | |
</html> |
解决方案
This forum is for questions about Office Live. Your best bet here would be to post this question in the Internet Explorer newsgroup at http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.internetexplorer.general.
Robert
这篇关于使用IE6和ActiveX的ActiveX警告IE7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文