1 var jsum=0; 2 for(var j=1;j<=100;j+=2){ 3 jsum+=j; 4 } 5 document.write('奇数的和='+jsum); 6 document.write('<hr color="#00FFFF"/>');