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

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

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