title: How to access the Javascript variable value outside the script tag
body: <p>I want to access the Javascript variable value outside the Javascript tag.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function getprices(input) {
      return input.match(/[0-9]+/g);
  }
  var subtotals = get_getprices('%GLOBAL_OrderTotal%');
  var Grand_total = subtotals[0];</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;img height="0" width="0" border="0" src="http://testing.com?merchantId=M1&amp;orderNo=%%GLOBAL_OrderId%%&amp;saleAmount=I want the Grand+Total Value here"&gt;</code></pre>
  </div>
  </div>
  </p>