开发者

call function in jquery-ajax

开发者 https://www.devze.com 2023-01-04 18:48 出处:网络
i have a show function in my test.php page , how may i call show() function in ajax instead url:test.php开发者_运维知识库 in following code

i have a show function in my test.php page , how may i call show() function in ajax instead url:test.php开发者_运维知识库 in following code

$.ajax({
  url: **'test.php'**,
  success: function(result) {
    alert(ersult);
  }
});


You cannot do this as jQuery knows nothing about php functions. An AJAX call is always performed to some server side script in which processing takes place and returns the result. So you could call this function in the test.php script.

0

精彩评论

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