arrayobj.join(separator)
将数组中的所有元素用separator连接起来,如
a = new Array(0,1,2,3,4);
b = a.join("-");
b应该为0-1-2-3-4。
将数组中的所有元素用separator连接起来,如
a = new Array(0,1,2,3,4);
b = a.join("-");
b应该为0-1-2-3-4。
解决方案 »
- showmodelessdialog的help参数的问题(帮助按钮)
- 有什么软件能使Dreamweaver 8 提示javascript代码 吗?
- how to solve the following problem in JS define?
- 关于Ext的两个grid拖拽后保存数据的问题?
- jsp中判断单选按钮组,复选按钮不为空的js或者其他解决办法
- 请问一个框架之间函数调用的问题
- 正则表达式如何匹配多行
- 求一个事件!关于checkbox的单击事件(在线等)
- 怎么能,当鼠标移至输入框时即把内容全选中?
- 求腾讯文件服务器一个网址
- 能否改变Select中每行的高度?
- 对已生成的窗体缩小和移位后,恢复原始状态遇到的问题
Converts all elements of an array into a String object and joins them.
Syntax
arrayobj.join(separator) The separator argument is a String object that is used to separate one element of an array from the next in the resulting String object. If omitted, the array elements are separated with an empty string.Res
The join method returns a String object that contains each element converted to a string and concatenated together.
The following example illustrates the use of the join method: function JoinDemo()
{
var a, b;
a = new Array(0,1,2,3,4);
b = a.join("-");
return(b);
}--------------------------------------------------------------------------------
参数
arrayObj
必选项。Array 对象。
separator
必选项。是一个 String 对象,作为最终的 String 对象中对数组元素之间的分隔符。如果省略了这个参数,那么数组元素之间就用一个逗号来分隔。
说明
如果数组中有元素没有定义或者为 null,将其作为空字符串处理。