<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> </title>
</head>
<body>
<script type="text/javascript">
var arr=['ling','yi','er','san','si','wu','liu','qi','ba','jiu'];
var q=prompt("请输入数字");
var s=w=e=c=v=l=0;
var r=Number(q);
if(r<0)
{
document.write("fu"+" ");
}
for(var i=0;i<arr.length;i++)
{
if(r<0)
{
s=Math.abs(r);
w=s.toString();
e=w.split('');
for(var j=0;j<e.length;j++)
{
if(i==e[j])
{
document.write(" "+arr[i]);
}
}
}
else
{
c=r.toString();
v=c.split('');
for(var l=0;l<v.length;l++)
{
if(v[l]==i)
{
document.write(arr[i]+" ");
}
}
}
}
</script>
</body>
</html>
08-12
439
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-14
806
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
03-16
6140
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-11
3935
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-24
7893
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-07
3306
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)