使用load()方法異步請求數(shù)據(jù), 我自己設立一個HTML文件,之后用load()方法加載它,為什么不好用呢?必須提前建立相同域名環(huán)境嗎?以下是我的代碼:<body><h3>My favourite things</h3><button>button</button><div></div><script type="text/javascript"> $(function(){ $("button").click(function(){ $("div").html("<img src='../img/gif.jpg'>").load("text.html",function(){ $(this).attr("disabled","true"); }) }) })</script></body>
使用load()方法異步請求數(shù)據(jù), 我自己設立一個HTML文件,之后用load()方法加載它,為什么不好用呢?
qq_Sunshine_50
2015-12-27 18:29:44