2010-12-03 4 views

Répondre

0

Ma solution finale ...

 
$("#textbox_id").html('html content given here'); 

$("#textbox_id").find('img').each(function() { 
     alert($(this).attr("id")); 
    }); 
1

n'ont pas Encadrés HTML à l'intérieur eux, ils ont seulement une valeur, à laquelle vous pouvez accéder via .val(). Ensuite, vous passez cette chaîne à jQuery:

var textboxHTML = $("#textbox_id").val(); 
$(textboxHTML).filter("img").each(function() { 
    alert($(this).attr("id")); 
}); 
Questions connexes