Microsoft JScript运行时错误:对象不支持属性或方法“切片" [英] Microsoft JScript runtime error: Object doesn't support property or method 'slice'
本文介绍了Microsoft JScript运行时错误:对象不支持属性或方法“切片"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我遇到以下错误:
Microsoft JScript运行时错误:对象不支持属性或方法切片"
当我在IE9中运行项目时.
n.replace.call(f.slice(e.index),a,function(){for(var c = 1; c
i am getting below error :
Microsoft JScript runtime error: Object doesn''t support property or method ''slice''
when i run the project in IE9.
n.replace.call(f.slice(e.index),a,function(){for(var c=1;c<arguments.length-2;c++)if(arguments[c]>
推荐答案
谁知道您的f
是什么?无论如何,这是一些没有此方法的对象,仅此而已.与其问这样的问题,不如问自己为什么您认为函数slice
是在f
中定义的,然后定义它还是使用具有此功能的对象.
您可能希望使用为数组对象定义的数组对象并选择数组元素的范围:
http://www.w3schools.com/jsref/jsref_slice_array.asp [
Who knows what is yourf
? Anyway, this is some object which does not have this method, that''s it. Instead of asking such question, ask yourself why do you think that the functionslice
is defined inf
. And then have it defined or use the object which has this function.
Chances are, you want to work with the array object which is defined for array objects and selects a range of elements of an array:
http://www.w3schools.com/jsref/jsref_slice_array.asp[^].
If this is what you need, you problem is thatf
is not an array. Trivial, yes, but this is all one can see from your question.
—SA
这篇关于Microsoft JScript运行时错误:对象不支持属性或方法“切片"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文