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

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

Lets say for example:

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

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


        
4条回答
  •  长情又很酷
    2020-12-31 22:37

    That is the right approach to the problem.

    The easiest way to find out the context would be to use Firebug and console.log(this) — I suspect it would be the XHR object though.

提交回复
热议问题