上的「訪問被拒絕」錯誤在以下ajax代碼我得到一個「訪問被拒絕」錯誤消息。可以幫助我在這方面的人。ajax
<html>
<head>
<script type="text/javascript">
function a()
{
var xmlhttp=new XMLHttpRequest();
xmlhttp.open("GET","load1.txt",true);
xmlhttp.onreadystatechange=function()
{
document.getElementById("hello").innerHTML=xmlhttp.requestText;
}
}
</script>
</head>
<body>
<input type="button" value="hello" onclick="a()"/>
<div id="hello"></div>
</body>
</html>
的活生生的例子作爲錯誤說烏爾否認訪問該特定文件..檢查您是否有權訪問load1.txt – Vijay 2011-04-28 09:34:29
是的,我有讀取寫入權限。:-) – 2011-04-28 09:37:01