开发者

Can we use jquery $.post() for using muliple urls in it

开发者 https://www.devze.com 2023-04-09 07:06 出处:网络
var js={\"studentId\":$(this).val()}; $.post(url+\"admin/course/getformadmissionfees\",js,function(data){
        var js={"studentId":$(this).val()};
        $.post(url+"admin/course/getformadmissionfees",js,function(data){
        $("#student").val(data.admissionFee);
        $("#studentform").val(data.formFee);

My question can i include different url 1

url+"admin/course/getformadmissionfees"

and url 2

url+"adm开发者_如何学JAVAin/course/getformadmissionfees"

url+"admin/course/getformadmission"

in one $.post


No. It is only one HTTP call. You can however roll this up into reusable bites.


No you can't, because each $.post handles only one request.

You can, however, design your server-side script to accept more parameters, eg:
admin/course/getformadmission/getformadmissionfees

0

精彩评论

暂无评论...
验证码 换一张
取 消