I'm using and $.ajax method to get an html text. I would like to parse this html, getting the "src" from an "img" tag. I've done this way:
$.ajax({
type: "GET",
url: "image1.html",
success: function(msg){
var htmlCode = $(msg).html();
var title = $("#immagine", htmlCode).attr("src");
alert( title);
}
});
I can get the right result from Firefox and Chrome. They alert the correct "src" value (ex: 'pics/image.jpg'). But IE return an "undefined" alert. Can someone help me? Thanks