var my_friends ="trixie,moxie,sven,guido,hermes";
">

javascript中split和整数字符串互转的用法。。。

80酷酷网    80kuku.com

  javascript|字符串

<script >
function evil()
{

var toint=parseInt("123");

var intvalue=123;

var tostr=intvalue.toString();


var my_friends ="trixie,moxie,sven,guido,hermes";
var friend_array =my_friends.split(",");
for (loop=0; loop < friend_array.length;loop++)
{
document.writeln(friend_array[loop] + " is myfriend.
");
}
}
</script>















分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: