问题
Is it possible when specifying a jQuery UI dialog box, to have an image be placed for my title instead of just plain text?
Thanks
回答1:
You can provide any HTML as the title
option, like this:
$("#dialog").dialog({
title: '<img src="myImage.jpg" />'
});
You can see an example in action here
Or, as another demo to annoy the hell out of your users, you could do this:
$("<div />").dialog({
title: '<marquee>Hello</marquee>'
});
来源:https://stackoverflow.com/questions/3543532/jquery-ui-dialog-image-for-the-title