1 var he = 0; 2 for(var h=1;h<=100;h++){ 3 he+=h; 4 } 5 document.write('1-100之间的和是'+he); 6 document.write('<hr color="#00FFFF"/>');