<html>
<head>
<script type="text/javascript" src="jquery-1.8.2.js"></script>
<script type="text/javascript">
// we will add our javascript code here
$(document).ready(function() {
$.get('http://baidu.com', function(data) {
console.log(data);
});
console.log("Sample of data33:");
});
</script>
</head>
<body>
<!-- we will add our HTML content here -->
<a href="">Link</a>
</body>
</html>
Chrome console: Sample of data33: dd.html:11 XMLHttpRequest cannot load http://baidu.com/. Origin http://192.168.7.14:88 is not allowed by Access-Control-Allow-Origin.
3 回复