javascript charAt() arr[i]数组实例代码 时间:2020-05-12 人气:0 <script language="javascript" type="text/javascript"> window.onload = function(){ var strWebInfo = "www.qb5200.com"; for(var i = 0;i < strWebInfo.length;i++){ document.writeln(strWebInfo.charAt(i)) } } </script> [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行] <script language="javascript" type="text/javascript"> window.onload = function(){ var str = "a$h$u$i$n$a$n"; var arr = str.split('$'); for(var i = 0;i < arr.length;i++){ document.writeln(arr[i].toString()); } } </script> [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行] 加载全部内容