使用JavaScript从get请求返回信息

时间:2013-05-23 14:53:35

标签: javascript jquery google-analytics google-analytics-api

伙计们,我认为我的问题很简单而且很愚蠢...但是,请温柔。

有什么办法可以使用javascript从get请求中返回信息吗?我想将谷歌分析中的utmr信息保存到变量中。

http://imgur.com/GxBQkgB

(抱歉,对于糟糕的英语;))

1 个答案:

答案 0 :(得分:0)

HTTP GET request in JavaScript?

function httpGet(theUrl)
{
var xmlHttp = null;

xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", theUrl, false );
xmlHttp.send( null );
return xmlHttp.responseText;
}
相关问题