var a=1;
var b=1;
document.write(b+"<br/>");
var c;
document.write(c+"<br/>");
var n=3;
while (n<=20){
c=a+b;
document.write(c+"<br/>");
a=b;
b=c;
n++
}
原文:http://www.cnblogs.com/Lv2017/p/6666663.html