What context is the jQuery.post callback function invoked in?

前端 未结 4 1657
清酒与你
清酒与你 2020-12-31 22:12

Lets say for example:

$(\".button\").click(function() {

    $.post(\"commandrunner.php\",
        {
            param1: \'value\',
            param2: \'val         


        
4条回答
  •  感情败类
    2020-12-31 22:33

    According to jquery api (under "Callback Function Queues") the this object in any JQuery AJAX callback function will automatically point to the settings of the ajax object or - if specified - the context object.

    Sadly you cannot specify a context in $.post().

提交回复
热议问题