How to read the value returned by an AJAX response
Sorry for the vague title but I'm not sure how to phrase this question.
How do I get the value of a non-element? I want to send a value into a function that is not a class or id.
This is normally how I'm used to getting a value within a function but in this case, I want to send a string into the function. How is this done? Can someone please provide an example?
var url = $('#url').val();
Something along these lines:
var u开发者_JAVA技巧rl = mystring.val();
An ajax response can contain text, json, xml, or whatever other format you want, and jQuery facilitates this. How you implement the entire end-to-end communication is dependent on what you're using for server-side stuff.
Check out $.ajax.
精彩评论