php - Jquery pass parameter from script tag -



php - Jquery pass parameter from script tag -

hi guys want know there possibility pass variables from

<script src="js/scripts.js"></script>

this tag? mean this:

<script src="js/scripts.js">$par = "hello world"</script> or <script src="js/scripts.js" par="hello world"></script>

there no need or utilize of defining variable do.

try this:

<script>var par = "<?php echo $par; ?>"</script>

php javascript jquery variables parameter-passing

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

r - url in CRAN extension manual -

asp.net - .NET Control.ID property inconsistency -