[jQuery] 利用Google載入jQuery
KEY申請: http://code.google.com/intl/en/apis/loader/signup.html
google.load(“jquery”, “1”);
版本號細節不填會自動抓最新的
例 “1” 會抓 1.4.4 “1.3” 會抓1.3.2
google.load() 一定要先載入,再開另外的<script>執行jQuery語法
[html]
<–key記得去申請並填上–>
<script src=”http://www.google.com/jsapi?key=" type=”text/javascript”></script></pre>
<!–more–>
<pre>
<script type=”text/javascript”>
google.load(“jquery”, “1”);
</script>
<script type=”text/javascript”>
$(document).ready(function(){
window.setInterval(‘GetData()’, 1000);
});
function GetData(){
$(‘#abc’).load(“testajaxinclude.php?timeStamp=” + new Date().getTime());
}
</script>
======================
<div id=abc>a</div>
[/html]