var num=prompt("请输入数字:");
var ge=parseInt(num%10);
var shi=parseInt(num/10%10);
var bai=parseInt(num/100%10);
var qian=parseInt(num/1000);
document.write("个位数字:"+ge);
document.write("<br/>十位数字:"+shi);
document.write("<br/百位数字:"+bai);
document.write("<br/千位数字:"+qian);
卖火柴的小舒
相关分类