I have done jQuery and Ajax , but I am not able to get the response into a Div element. This This is the code:
Index.html
$.ajax({ type:"POST", url: "ajax.php", data:"id="+id , success: function(html){ $("#response").html(data); } }); It is receiving the response to my <div id="response"></div>.
The ajax.phpajax.php returns following code to the index.htmlindex.html file:
<div id ="one">OneVal="one"> OneVal </div> <div id ="sub"> SubVal </div> Will I able to extract the OneVal and Subval into a variable, and how can I extract the OneVal"OneVal" and SubVal"SubVal", instead of above response?