本帖最后由 gaochenfeng2008 于 2009-08-20 13:49:36 编辑

解决方案 »

  1.   

    火狐不支持 ActiveX 控件
      

  2.   


    <script>
    function LoadXml(str) { 
        if (document.all) { 
            var xmlDoc = new ActiveXObject("Microsoft.XMLDOM") 
            xmlDoc.loadXML(str); 
            return xmlDoc; 
        } 
        else 
            return new DOMParser().parseFromString(str, "text/xml") 

        var str = " <question type=\"open\" id=\"q1\" ismust=\"true\" validate=\"1\" ismultirow=\"false\" width=\"50\" max=\"0\" min=\"0\"><title><![CDATA[问答题题干]]></title><description> <![CDATA[问答题描述信息]]> </description> <qscript> <![CDATA[问题脚本]]></qscript></question>";
        var xmlDoc = LoadXml(str); 
        var question = xmlDoc.getElementsByTagName("question"); 
        var title = question[0].getElementsByTagName("title")[0]; 
        document.write(title.childNodes[0].nodeValue); 
    </script>