T
Trev
Hi all,
Are variables in javascript local to the page, or to the <script> tags
they are defined within?
Say I had a bit of code as follows:
<HEAD>
<script>
var myVar = MyFunction();
</script>
</HEAD>
could I then use myVar as follows?
<BODY>
<script>
MyOtherFunction( myVar );
</script?
</BODY>
Are variables in javascript local to the page, or to the <script> tags
they are defined within?
Say I had a bit of code as follows:
<HEAD>
<script>
var myVar = MyFunction();
</script>
</HEAD>
could I then use myVar as follows?
<BODY>
<script>
MyOtherFunction( myVar );
</script?
</BODY>