How to use global variable

Global Variable 



<html>
<head>

<script>
var data=200;//global variable

function a()
{
document.writeln(data);
}
function b(){
document.writeln(data);
}
a();//calling JavaScript function
b();  
</script>
</body>
</html>  

Comments

Popular posts from this blog

java script book in PDF format