一个代码
上一篇 /
下一篇 2007-07-27 05:08:00
- 文件版本: V1.0
- 开发商: 本站原创
- 文件来源: 本地
- 界面语言: 简体中文
- 授权方式: 免费
- 运行平台: Win9X/Win2000/WinXP
<input type=text id=aa><input type=button ōnclick=a(aa.value)>
<scrīpt>
function a(n)
{
for(i=-n;i<=n;i++)
{
for(j=1;j<=Math.abs(i);j++)
document.write(" ");
for(j=1;j<=n*2+1-Math.abs(i)*2;j++)
{
(j==1||j==n*2+1-Math.abs(i)*2)?document.write("*"):document.write(" ");
}
document.write("<br>");
}
}
</scrīpt>
收藏
分享给好友
管理
举报
TAG: