你的星座运势
var http=new XMLHttpRequest();
var url="http://apis.baidu.com/bbtapi/constellation/constellation_query";
var params="consName=%E5%8F%8C%E9%B1%BC%E5%BA%A7&type=today";
http.open("GET", url + "?" + params, true);
http.setRequestHeader("apikey", "这里填写你的apikey");
http.onreadystatechange=function() {
if(http.readyState==4 && http.status==200) {
var astrology=document.getElementById("astrology");
astrology.innerHTML=http.responseText;
http.send(null);
评论列表