Javascript examples for jQuery:Variable
jQuery global variable, not working
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from ww w . j a v a2 s .com*/ var test_1 = "None"; $(function(){ console.log(test_1) }) } </script> </head> <body> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> </body> </html>