jQuery ကျူတိုရီရယ်

jQuery ပင်မစာမျက်နှာ jQuery မိတ်ဆက် jQuery စတင်လိုက်ပါ။ jQuery Syntax jQuery ရွေးချယ်မှုများ jQuery ပွဲများ

jQuery အကျိုးသက်ရောက်မှုများ

jQuery ဖျောက်/ပြပါ။ jQuery အရောင်မှိန်ခြင်း။ jQuery Slide jQuery Animate jQuery stop() jQuery ပြန်ခေါ်ပါ။ jQuery ချိတ်ဆက်ခြင်း။

jQuery HTML

jQuery ကိုရယူပါ။ jQuery သတ်မှတ် jQuery ကိုထည့်ပါ။ jQuery ကိုဖယ်ရှားပါ။ jQuery CSS အတန်းများ jQuery css() jQuery အတိုင်းအတာများ

jQuery လမ်းလျှောက်ခြင်း။

jQuery လမ်းလျှောက်ခြင်း။ jQuery ဘိုးဘေးများ jQuery မျိုးဆက်များ jQuery မောင်နှမများ jQuery စစ်ထုတ်ခြင်း။

jQuery AJAX

jQuery AJAX နိဒါန်း jQuery Load jQuery Get/Post

jQuery ထွေ

jQuery noConflict() jQuery စစ်ထုတ်မှုများ

jQuery ဥပမာများ

jQuery ဥပမာများ jQuery စာမေးပွဲ jQuery လေ့ကျင့်ခန်းများ jQuery လက်မှတ်

jQuery ကိုးကားချက်များ

jQuery ခြုံငုံသုံးသပ်ချက် jQuery ရွေးချယ်မှုများ jQuery ပွဲများ jQuery အကျိုးသက်ရောက်မှုများ jQuery HTML/CSS jQuery လမ်းလျှောက်ခြင်း။ jQuery AJAX jQuery ထွေ jQuery ဂုဏ်သတ္တိများ

jQuery get() နည်းလမ်း

❮ jQuery AJAX နည်းလမ်းများ

ဥပမာ

စာမျက်နှာတစ်ခုသို့ HTTP GET တောင်းဆိုချက်ကို ပေးပို့ပြီး ရလဒ်ကို ပြန်လည်ရယူပါ-

$("button").click(function(){
  $.get("demo_test.asp", function(data, status){
    alert("Data: " + data + "\nStatus: " + status);
  });
});

အဓိပ္ပါယ်နှင့် အသုံးပြုမှု

$.get() နည်းလမ်းသည် HTTP GET တောင်းဆိုမှုကို အသုံးပြု၍ ဆာဗာမှဒေတာကို တင်ပါသည်။


ဥပမာများ

"test.php" ကို တောင်းဆိုသော်လည်း ရလဒ်များကို လျစ်လျူရှုပါ-

$.get("test.php");

"test.php" ကို တောင်းဆိုပြီး တောင်းဆိုချက်နှင့်အတူ နောက်ထပ်ဒေတာအချို့ကို ပေးပို့ပါ (ပြန်ရလာဒ်များကို လျစ်လျူရှုပါ)။

$.get("test.php", { name:"Donald", town:"Ducktown" });

"test.php" ကို တောင်းဆိုပြီး ဆာဗာသို့ ဒေတာအခင်းအကျင်းများကို ပေးပို့ပါ (ပြန်ရလာဒ်များကို လျစ်လျူရှုပါ)။

$.get("test.php", { 'colors[]' : ["Red","Green","Blue"] });

"test.php" ကို တောင်းဆိုပြီး တောင်းဆိုမှု၏ရလဒ်ကို သတိပေးပါ-

$.get("test.php", function(data){
  alert("Data: " + data);
});


အထားအသို

$.get(URL,data,function(data,status,xhr),dataType)

Parameter Description
URL Required. Specifies the URL you wish to request
data Optional. Specifies data to send to the server along with the request
function(data,status,xhr) Optional. Specifies a function to run if the request succeeds
Additional parameters:
  • data - contains the resulting data from the request
  • status - contains the status of the request ("success", "notmodified", "error", "timeout", or "parsererror")
  • xhr - contains the XMLHttpRequest object
dataType Optional. Specifies the data type expected of the server response.
By default jQuery performs an automatic guess.
Possible types:
  • "xml" - An XML document
  • "html" - HTML as plain text
  • "text" - A plain text string
  • "script" - Runs the response as JavaScript, and returns it as plain text
  • "json" - Runs the response as JSON, and returns a JavaScript object
  • "jsonp" - Loads in a JSON block using JSONP. Will add an "?callback=?" to the URL to specify the callback

❮ jQuery AJAX နည်းလမ်းများ