<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head> <title>無標(biāo)題頁</title> <script type="text/javascript" src="js/jquery.min.js"></script> <script type="text/javascript"> $(function(){ $.ajax({ type:"get", url:"ajax/upanddown.aspx", data: "aid=[$aid$]&cid=[$cid$]", success:function(data, textStatus){ if(data){ alert("111"); }else{ alert("222"); } }, error: function(){ alert("ajax請求出錯"); } }); });</script></head><body></body></html>
2 回答

胡說叔叔
TA貢獻(xiàn)1804條經(jīng)驗(yàn) 獲得超8個贊
url:"ajax/upanddown.aspx" ,這個是否正確?
data: "aid=[$aid$]&cid=[$cid$]", aid和 cid 你是這那里賦值的 你用Firefox 調(diào)試腳本的時候,應(yīng)該執(zhí)行到這句就停止了
- 2 回答
- 0 關(guān)注
- 512 瀏覽
添加回答
舉報
0/150
提交
取消