代码展示
let a = prompt("请输入一个数", "")
for (let j = 0; j <= 2; j++) {
b = a % 10;
document.write("<br>" + b + "<br>")
a = (a - b) / 10;
}
结果展示
let a = prompt("请输入一个数", "")
for (let j = 0; j <= 2; j++) {
b = a % 10;
document.write("<br>" + b + "<br>")
a = (a - b) / 10;
}