AJAX request callback using jQuery

后端 未结 5 1013
梦谈多话
梦谈多话 2020-11-21 23:01

I am new to the use of jQuery for handling AJAX, and have written a basic script to get the basics down. Currently I am POSTing an AJAX request to the same file, and I wish

5条回答
  •  无人共我
    2020-11-21 23:31

    NOTE *The better approach is to keep things like this in a separate file, makes it easier to read and easier to understand, especially if you use a good naming conversion.

    It is a bad procedural approach but here I go :) :

    
    

    or better yet:

    
    

    PS As alternative to die(); you could use exit();, they both do pretty much the same: terminating further execution

提交回复
热议问题