Ajax Get in ecshop

function like_goods(id, attitude) {
    var result = Ajax.call("ajax_api.php?act=like_goods", "id="+id+"&attitude="+attitude, null, "GET", "JSON", false);
    if(result.error > 0) {
        alert(result.message);
        return ;
    }
    try{
        if(attitude == "like_it") {
            document.getElementById(attitude).innerHTML = result.attitude;
        }
    } catch(e) {}
}

你可能感兴趣的:(Ajax Get in ecshop)