Help me with var in javascript?

I have a 1.htm file

var a=1;

<!---- i want to get var a=1 . but don’t give var a into <script>…</script>---->
<script src=“1.js”></script>

In 1.js file writed:


I want to call var a from 1.htm file to 1.js
Can everyone help me !
Thanks all very much !!!

You need to put that statement between script tags, then follow that with the inclusion of your other JavaScript file:

<script type="text/javascript">
  var a = 1;
<script src="1.js"></script>