jquery简单异步读取xml文件

 $.ajax({
            url: '../XmlFiles/Sm.xml',
            async: true,
            cache: false,
            dataType: 'xml',
            error: function (error) { alert(error); },
            success: function (xml) {
                $('#TextArea1').val($(xml).find("content").text());
            }
        });

原文地址:https://www.cnblogs.com/guozefeng/p/3244177.html