[DEVELOPMENT/CODNING]#02. JQUERY, AJAX

나지현
Jul 12, 2021

Extract the desired data using OPEN API

The point (JQUERY)

CLICK ▶Get INPUT values
: let txt = $(‘#INPUT values’).val();

  • check : console.log(txt)

Include specific letter
: txt.includes(‘txt’)

Extract txt(ex.domain)
: txt.split(‘@’)[1].split(‘.’)[0]
(EX.hello.gmail.com > gmail)

Append txt
: $(‘#id’).append(txt)

The point (AJAX)

🟣AJAX Frame(‘get’)

$.ajax({
type: “GET”,
url: “URL”,
data: {},
success: function(response){
}
})’

Change the img src
: $(‘#id’).attr(‘src’,imgurl*)

*let imgurl = response[0][‘url’]

Loading▶Action
$(document).ready(function () {
get_rate();
});

Add a Real-time exchange rates using AJAX(‘get’)

I will study more to make a better homepage with SPARTACODING

I CAN DO IT!!

--

--