【发布时间】:2011-08-11 02:50:29
【问题描述】:
var i;
for(i=10; i>=0; i= i-1){
var s;
for(s=0; s<i; s = s+1){
document.write("*");
}
//i want this to print a new line
/document.write(?);
}
我正在打印一个星星金字塔,我无法打印新行。
【问题讨论】:
-
document.write("
"); // 如果使用 .html -
相关话题here.
标签: javascript html newline line-breaks