开发者

jQuery split problem

I have a script, which returns value as an object. It can return text or numbers, like 'hello, goodbye' or '500, 900'.

When I try to use split() with this object, I catch an error:

TypeError: Object 'hello, goodbye' has no method 'split'

But I want to use split. What开发者_开发技巧 can I do?

Seems the only way to convert this object into a string, how to do that?


does a = a+''; a.split('') work? that should convert the object to string before split is called.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜