Hi,
A very simple question I'd like to ask, why intializing a var outside a function, it cannot be used in that function?
exmaple:
<script type="text/javascript" >
var myvariable = document.getElementById("someID");
function someMethod(){
//some stuff here, and I cannot use myvariable inside here why?
}
</script>