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
Post a Comment