Home >Web Front-end >JS Tutorial >JScript split string sample code_javascript skills

JScript split string sample code_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:23:381088browse

No more nonsense, just use the code to explain:

Copy the code The code is as follows:

try
{
var ss = new Array();
var str="123,4567,89,0";
ss = str.split(","); // Split by comma Symbol
for(i=0;iWScript.Echo(ss[i]);
}
catch(e)
{
WScript .Echo(e.description);
}
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn