JSLite / JSLite

与jQuery有着类似的api,让web开发更迅速,下载执行更快、量级更轻,针对现代高级浏览器的JavaScript库。

Home Page:http://jslite.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

xml find方法解析错误

huashidou opened this issue · comments

用Jquery OK,换成JSLite报错误信息如下
SyntaxError: DOM Exception 12: An invalid or illegal string was specified.
querySelectorAllJSLite.js:299
(匿名函数)JSLite.js:299
initJSLite.js:301
JSLiteJSLite.js:272
successjxml.html:14
onreadystatechangeJSLite.js:1093

document.querySelectorAll(selector) JSLite.js:300

@huashidou 你这个是ajax 调用返回数据然后调用find方法报错的吗?如下面实现?

$.ajax({
    url: 'http://127.0.0.1:1987/test.xml',
    dataType: 'xml',
    success: function(data , xhr, settings, deferred){
        $(data).find("jsliteeee")
    }
});