XSL parameters using JavaScript
问题 I have a html page like: <html> <head> <script> function loadXMLDoc(dname) { if (window.XMLHttpRequest) { xhttp=new XMLHttpRequest(); } else { xhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xhttp.open("GET",dname,false); xhttp.send(""); return xhttp.responseXML; } function displayResult() { xml=loadXMLDoc("1.xml"); xsl=loadXMLDoc("2.xsl"); // code for IE if (window.ActiveXObject) { xml.addParameter("rss", test); ex=xml.transformNode(xsl); document.getElementById("example").innerHTML=ex; } //