Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jQueryGet将当前url添加到MyURL参数中_Jquery - Fatal编程技术网

jQueryGet将当前url添加到MyURL参数中

jQueryGet将当前url添加到MyURL参数中,jquery,Jquery,我在文档中有一个GET请求。我所在的当前页面包含该文档,然后执行该文档。问题是文档在包含时被发现,但GET请求不是,因为GET(根据firebug)发送的请求是http://www.site.com/watch/http//www.site.com/file/doc.php当请求应该由GET tohttp//www.site.com/file/doc.php请求时。我所在的当前页面是http://www.site.com/watch/123456wherewatch是video.php?vid_

我在文档中有一个GET请求。我所在的当前页面包含该文档,然后执行该文档。问题是文档在包含时被发现,但GET请求不是,因为GET(根据firebug)发送的请求是
http://www.site.com/watch/http//www.site.com/file/doc.php
当请求应该由GET to
http//www.site.com/file/doc.php请求时
。我所在的当前页面是
http://www.site.com/watch/123456
wherewatch
video.php?vid_id=
的别名。有人知道为什么会这样吗

         $.getJSON("http//www.site.com/file/doc.php?action=view&load=initial&page="+page+"&vid_id="+vid_id+"&username="+username+"&t=" + (new Date()), function(json) {  
  var html = '';
  for(i=0; i < json.length; i++) {
    html += prepare(json[i]);
  }
  $('#shoutbox-list').append(html).find('li').fadeIn(1500);
   $('div[id="chunk"]').fadeIn(1500);
});
$.getJSON(“http://www.site.com/file/doc.php?action=view&load=initial&page=“+page+”&vid_id=“+vid_id+”&username=“+username+”&t=“+(new Date()),函数(json){
var html='';
for(i=0;i
您只需在URL中插入冒号,使其成为有效的资源标识符:

e、 g.改变:

$.getJSON("http//www.site.com/....


我真不敢相信我竟然忘了。非常感谢德克斯特!使用
$('div[id=“chunk”]')
,而不是
$('chink')
,速度要快得多。
$.getJSON("http://www.site.com/....
               ^