ajax.abort 终止AJAX请求

                          
            $(document).ready(function ()
            {
                var ajax;
                $('#choice').change(function()
                {
                    if(ajax)
                    {
                        ajax.abort();
                    }
                    ajax = $.get(
                        'wait.php',
                        { what : $(this).val() },
                        function(response)
                        {
                            $('#response').html(response);
                        },
                        'html'
                    );
                });
            });
原文地址:https://www.cnblogs.com/krisy/p/3687537.html