报了一堆错误代码,什么意思 ?

Uncaught TypeError: Cannot read property 'slice' of undefined
    at HTMLDocument.<anonymous> (index.php?s=/home/index/search/type/ask.html:666)
    at l (js.php?f=js/jquery-2.0.3.min.js,js/com/com.functions.js,static/os-loading/loading.js,js/core.js,js/…:2)
    at Object.fireWith [as resolveWith] (js.php?f=js/jquery-2.0.3.min.js,js/com/com.functions.js,static/os-loading/loading.js,js/core.js,js/…:2)
    at Function.ready (js.php?f=js/jquery-2.0.3.min.js,js/com/com.functions.js,static/os-loading/loading.js,js/core.js,js/…:2)
    at HTMLDocument.S (js.php?f=js/jquery-2.0.3.min.js,js/com/com.functions.js,static/os-loading/loading.js,js/core.js,js/…:2)

clipboard.png
显示的错误代码行数在178,666号

178号真实代码:
clipboard.png

代码最多330行,提示666行什么意思 ?

报错的地址:http://bbs.valueonline.cn/ind...

阅读 4.8k
4 个回答

$(".text_content").html()
没有找到对应的DOM元素
调用html方法返回undefined
undefined调用slice方法,然后就抛异常咯。

你直接在控制台打开吧。应该是上面那个没权限访问,然后回调函数里面没判断,对undefined做了slice了

这里可以看出来,你没有获取到东西
clipboard.png

对一个undefined调用了slice

看截图,你的 $all 为 undefined

图片描述

推荐问题