2013-03-31 48 views

回答

6

後,您可能想

$(document).ready(function(){ 
    $('#ajax-palaceholder').load('http://localhost/devlab/quedata_v2/users.php'); 
}); 

.ready帶一個函數作爲參數。

你得到這個": missing after property id"錯誤消息,因爲{something}看起來像一個對象字面值,但通常是{propertyid:propertyvalue}

0

u需要()的函數作爲參數內的document.ready

試試這個

$(document).ready(function(){ 
       //--^^^^^^---here 
    //your code; 

}) 

或的document.ready shorhand ..

$(function(){ 
    //your code 
});