Home > front end >  The jQuery Ajax method
The jQuery Ajax method

Time:02-18

Have good intention can help realize this small feature  is to take out the data in the URL, small white is not very skilled, just use the get method, the simple implementation, the better,   really thank you
The following code is set, it's no use

CodePudding user response:

~ reply in reference to the building electricity white:
have good intention can help realize this small feature  is to take out the data in the URL, small white is not very skilled, just use the get method, the simple implementation, the better,   really thank you
The following code is set, it's no use

Using jQuery, vue of what also didn't learn

CodePudding user response:

Too obvious, you write wrong, data on behalf of the data, the date on behalf of the time, ajax useless date inside?

CodePudding user response:

The date to what is? And your interface address also not ah,
Ajax get and post can try more concise wording,
 
//this is according to your request to change, but certainly can't use, will give you a look at the reference reference
$.get (" https://api.xlongwei.com? Proid="+ $(" # proid"). Val (),
The function (e) {
The console. The log (e);
}
);

The following js site you provide the correct according to the lunar calendar conversion API
 
//get the day of the lunar calendar date
$.get (" https://api.xlongwei.com/service/datetime/convert.json ", function (e) {the console. The log (e); });
//e is the interface returned results, may be an object that may only be a string,

//if you want to look up a specific date, rather than today, can bring the day=yyyy - mm - dd parameters, such as, the get method in general can spell parameters directly in the url)
$.get (" https://api.xlongwei.com/service/datetime/convert.json? Day=2021/2/12 ",
The function (e) {
The console. The log (" zodiac "+ um participant anzhi + e.s hengxiao +" years, according to the lunar calendar: "+ hinese of e.c. with our fabrication:);
}
)

CodePudding user response:

refer to the second floor have a passion for code response:
too obvious, you have to write wrong, data on behalf of the data, the date on behalf of the time, it's no use ajax inside the date?

It's all right all right, get out in the middle of the night last night

CodePudding user response:

The
reference X - I - n reply: 3/f
17 lines of what the date is? And your interface address also not ah,
Ajax get and post can try more concise wording,
 
//this is according to your request to change, but certainly can't use, will give you a look at the reference reference
$.get (" https://api.xlongwei.com? Proid="+ $(" # proid"). Val (),
The function (e) {
The console. The log (e);
}
);

The following js site you provide the correct according to the lunar calendar conversion API
 
//get the day of the lunar calendar date
$.get (" https://api.xlongwei.com/service/datetime/convert.json ", function (e) {the console. The log (e); });
//e is the interface returned results, may be an object that may only be a string,

//if you want to look up a specific date, rather than today, can bring the day=yyyy - mm - dd parameters, such as, the get method in general can spell parameters directly in the url)
$.get (" https://api.xlongwei.com/service/datetime/convert.json? Day=2021/2/12 ",
The function (e) {
The console. The log (" zodiac "+ um participant anzhi + e.s hengxiao +" years, according to the lunar calendar: "+ hinese of e.c. with our fabrication:);
}
)

Thank you very much, can be used
  •  Tags:  
  • Ajax
  • Related