标签:
// ==UserScript== // @name tt // @namespace tt // @include * // @version 1 // @grant GM_xmlhttpRequest // ==/UserScript== var fullUrl = "http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js"; GM_xmlhttpRequest({ method: ‘GET‘, url: fullUrl, headers: { ‘User-agent‘: ‘Mozilla/4.0 (compatible) Greasemonkey‘, ‘Accept‘: ‘application/atom+xml,application/xml,text/xml‘, }, onload: function(responseDetails) { eval( responseDetails.responseText ); var dz = remote_ip_info.country + " > " + remote_ip_info.province + " > " + remote_ip_info.city; alert(dz); } });
Greasemonkey之GM_xmlhttpRequest
标签:
原文地址:http://www.cnblogs.com/hf1432/p/5062242.html