【发布时间】:2013-05-08 19:29:43
【问题描述】:
示例:假设当前页面 url(window.location.href) 为http://example.com/page.html html页面源码是...
<html><head></head><body>
<script src="http://example.com/script.js?user=Ankit&ptid=18"></script>
</body></html>
现在我需要在 script.js 中使用“src”变量 脚本文件 script.js 应该返回
var a="Ankit"
var b="18"
我们可以在 php 中使用类似 echo $_GET 的东西吗?
【问题讨论】:
-
你说的我没听懂
标签: php javascript url variables get