declaring global variable and accessing global variable

Declaring and Accessing


<html>
<head>
<script>
function m(){
window.value=100;//declaring global variable by window object
}
function n(){
alert(window.value);//accessing global variable from other function
}
n();
</script>
</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