麻烦帮我看看
<<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>iptaobao</title>
</head>
<body>
<h1>查询ip</h1>
<label>请输入查询的ip:</label>
<input type="text" id="keyword" />
<button id="search" onClick="taobao()">查询</button><br/>
<label>ip的信息为:</label><br/>
<p id="searchResult"></p>
<script type="text/javascript">
function taobao(){
var request=new XMLHttpRequest();
request.open("Get","http://iptaobao.com/service/getlpInfo.php?ip="+document.getElementById("keyword").value);
request.send();
request.onreadystatechange=function(){
if(request.readyState===4&&request.status===200){
document.getElementById("searchResult").innerHTML=request.responseText;
}
else
alert("发生错误"+request.status);
}
}
</script>
</body>
</html>
得不到想要的结果,出现已拦截跨源请求:同源策略禁止读取位于 http://iptaobao.com/service/getlpInfo.php?ip= 的远程资源。(原因:CORS 头缺少 'Access-Control-Allow-Origin')。请问要怎么解决。