js字符串测试

<html>
<head>
<title>Test</title>
<script type="text/javascript">
var str="0101,0102,0103,0104";
function test()
{
alert("test");
result=str.split(",");
result.splice(2,1);
alert(result.join("-"));
}
</script>
</head>
<body onload="test()">
</body>
</htmL>

posted @ 2010-01-03 23:37  骨头  阅读(291)  评论(0编辑  收藏  举报