当前位置: 动力学知识库 > 问答 > 编程问答 >

php - how to read header data with javascript

问题描述:

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: