アットウィキロゴ

khlll

<html>
 <head>
<meta charset="utf-8" />
</head>
 <body>
<div style="border-style: solid; background-color: lavender;">
<pre>
<code>
&lt;html>
&lt;head>
&lt;title>例題7:繰り返し&lt;/title>
&lt;meta charset="utf-8" />
&lt;script src="sample.js" >$lt;/script>
&lt;/head>
&lt;body onload="sample()">
&lt;/body>
&lt;/html>
</code>
</pre>
</div>
<div style="border-style: solid; background-color: lavender;">
<pre>
<code>
function sample(){
 
var s,n;
n=0;
for(s=1;s<11;s++){
n=n+s;
}
 
alert(n);
 
}
</code>
</pre>
</div>
 </body>
</html>
最終更新:2015年10月31日 03:00