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
Post a Comment