アットウィキロゴ

kansuu

<html>
 <head>
<meta charset="utf-8" />
</head>
 <body>
<div style="border-style: solid; background-color: lavender;">
<pre>
<code>
&lt;html>
&lt;head>
&lt;title>例題9:関数&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(){
 
n=f(5,2);
 
alert(n);
 
}
 
function f(x,y){
 
z=5*x+y;
 
return z;
}
 
</code>
</pre>
</div>
 </body>
</html>
最終更新:2015年10月31日 03:06