アットウィキロゴ

10p10p000

<html>
 <head>
<meta charset="utf-8" />
</head>
 <body>
<div style="border-style: solid; background-color: lavender;">
<pre>
<code>
&lt;html>
&lt;head>
&lt;title>例題10:返り値なし関数&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>
var x,y;   
 
function sample(){
 
f();
 
alert(x);
 
}
 
function f(){
 
x=5;
y=4;
 
 
}
 
</code>
</pre>
</div>
 </body>
</html>
最終更新:2015年10月31日 03:09