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

Set the variables to different values and different operators and then try...

auto redirected page in java script