我使用以下,
<div id='message' style="display: none;">
<span></span>
<a href="#" class="close-notify">X</a>
</div>
现在我想找到 div 内的跨度并为其分配一个文本......
function Errormessage(txt) {
$("#message").fadeIn("slow");
// find the span inside the div and assign a text
$("#message a.close-notify").click(function() {
$("#message").fadeOut("slow");
});
}