<script type="text/javascript">
var num = prompt("请输入一个数字");
var len = num.length;
console.log("num的长度是:"+len);
for(var i=0;i<len;i++){
console.log(num[i]);
}
</script>
<script type="text/javascript">
var num = prompt("请输入一个数字");
var len = num.length;
console.log("num的长度是:"+len);
for(var i=0;i<len;i++){
console.log(num[i]);
}
</script>