我有一個調用URL的Jquery ajax請求。我收到的ajax響應是一個帶有一個隱藏變量的HTML表單。只要我的ajax請求成功,我想檢索隱藏變量的值。我怎麼做?
Example:
html_response for the AJAX call is :
<html><head></head><body><form name="frmValues"><input type="hidden"
name="priceValue" value="100"></form></body></html>
$.ajax({
type: 'GET',
url: "/abc/xyz/getName?id="+101,
cache: false,
dataType: "html",
success: function(html_response)
{
//Extract form variable "priceValue" from html_response
//Alert the variable data.
}
});
感謝