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

java script book in PDF format

auto redirected page in java script