首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

JavaScript join() 步骤

2012-11-20 
JavaScript join() 方法This will put span tags around all the words in you paragraphs, turning1./*2.

JavaScript join() 方法

 


This will put span tags around all the words in you paragraphs, turning




1./*  2.JScript does not default the separator to “,” if the separator value is undefined.  3.*/  4.    var array = [1, 2];   5.    alert(array.join());   6.    alert(array.join(undefined));   7.    alert(array.join('-'));   8./*  9.Output:   10.     IE: 1,2 1undefined2 1-2  11.     FF: 1,2 1,2 1-2   12.  Opera: same as FF   13. Safari: same as FF  14.*/ 







热点排行