variable and .html

variable and .html

Hello,
This is my code:
  1. var test = "<div id='d1'>text1</div><div id='d2'>text2</div>";
  2. var value= $(test +" #d2").html();
  3. alert(value);

Please tell me now, why alert() return's me "text1"? How to make it return "text2"?