javascript中split和整数字符串互转的用法
2010-09-14 13:06:14 来源:WEB开发网核心提示:<script >function evil(){var toint=parseInt("123");var intvalue=123;var tostr=intvalue.toString();var my_friends ="trixie,moxie,sven,guido,
<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.<br>");
}
}
</script>
Tags:javascript split 整数
编辑录入:爽爽 [复制链接] [打 印]更多精彩
赞助商链接