<!DOCTYPE?html?>
<html?xmlns="http://www.w3.org/1999/xhtml">
????<head>
????????<title>使用load()方法異步請求數據</title>
????????<script?src="http://libs.baidu.com/jquery/1.9.0/jquery.js"?type="text/javascript"></script>
????????<link?href="style.css"?rel="stylesheet"?type="text/css"?/>
????</head>
????
????<body>
????????<div?id="divtest">
????????????<div?class="title">
????????????????<span?class="fl">我最愛吃的水果</span>?
????????????????<span?class="fr">
????????????????????<input?id="btnShow"?type="button"?value="加載"?/>
????????????????</span>
????????????</div>
????????????<div?id="ee"?style="width:200px;height:200px"></div>
????????</div>
????????
????????<script?type="text/javascript">
????????????$(function?()?{
????????????????$("#btnShow").bind("click",?function?()?{
????????????????????$("#ee").load("http://www.baidu.com");
????????????????})
????????????});
????????</script>
????</body>
</html>
2017-11-04
我叫朋友幫你看了,他說是域名不一樣,不能跨域請求。你自己看看是不是。
2017-09-12
為什么加載不了這個百度的網址