Ajax称为异步(Ajax call as async)
嗨我第一次使用ajax
我在Ajax中使用get方法
我的代码是Ajax代码
$("#comboBox1").change(function() { var text2 = $(this).children(':selected').text(); var value2 = $(this).val(); alert(text2 + " = " + value2); document.getElementById("hid1").value = value2; $.get('Check1',{hid1:value2},function(res){ $('#block3').load("new1.jsp"); }); if($('#cb5').length){ alert("Found"); combo2=$('#cb5').html(); alert(combo2); }else{ alert("Not-found"); } });
我需要调用异步,所以在我的代码中放置
async:true
。我是第一次使用Ajax所以我不知道....如果有人帮助我...
Hi i am using ajax first time
my i am using get method in Ajax
my code Ajax code is
$("#comboBox1").change(function() { var text2 = $(this).children(':selected').text(); var value2 = $(this).val(); alert(text2 + " = " + value2); document.getElementById("hid1").value = value2; $.get('Check1',{hid1:value2},function(res){ $('#block3').load("new1.jsp"); }); if($('#cb5').length){ alert("Found"); combo2=$('#cb5').html(); alert(combo2); }else{ alert("Not-found"); } });
i need to call as asynchronous so where to put
async:true
in my code.I am first time use Ajax so i Dose not know.... if anyone help me...
原文:https://stackoverflow.com/questions/22786597
更新时间:2021-11-02 21:11