URL: index.php? id = 123
复制代码代码如下:
<script type = "text / javascript">
fonction getRequest () {
var url = location.search; // 获取 url 中 "?" 符后的字串
var therequest = new object ();
if (url.indexof ("?")! = -1) {
var str = url.substr (1);
strs = str.split ("&");
pour (var i = 0; i <str.length; i ++) {
therest [strs [i] .split ("=") [0]] = UnEscape (strs [i] .split ("=") [1]);
}
}
retourner là-bas;
}
var demande = non défini;
Request = getRequest ();
var id = request ["id"];
</cript>