问题描述:

This question already has an answer here:

  • How can I get query string values in JavaScript?

    73 answers

网友答案:

Are you talking about getting the value from a get variable and using it in javascript? If so I've used something similar to this before:

<script type="text/javascript">
function myfunction(){
     var value = "<?php echo $_GET['test']; ?>"
}
</script>

And it's worked beautifully for me.

相关阅读:
Top