我正在尝试使用 Dreamweaver CS5 执行加载功能,但在这里我不能,我在 chrome 中收到此错误消息:
XMLHttpRequest cannot load file:///F:/suresh/HTML%20Files/google-adds-landing-pages/form.html. Origin null is not allowed by Access-Control-Allow-Origin.
我的代码是这样的:
<!DOCTYPE html>
<html>
<head>
<style>body{ font-size: 12px; font-family: Arial; }</style>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<b>Footer navigation:</b>
<ol id="new-nav"></ol>
<script> $("#new-nav").load("form.html");</script>
</body>
</html>
最佳答案
你可以使用WAMP,http://www.wampserver.com/en/ 对于您的 Web 开发项目,这也可以解决您的 XMLHttpRequest 问题。
关于jquery - 我尝试在 Dreamweaver CS5 中使用 jquery 执行加载功能,但它不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8587020/