bold, header effects in alert()?
in javascript, how to make alert bold n use h1 to h5 headers? Is this possible or simply p开发者_StackOverflow中文版lain alert is option?
how to include bold and h1 to this alert?
function onlooad()
{
alert("wssup??");
}
You can not use HTML in alert(). For that you need to use window.open() or some custom code like this:
http://docs.jquery.com/UI/Dialog
As far as I know, this is impossible.
You can use custom elements that act like alert boxes. Check this one out
jQuery Impromptu
Javascript alert is limited in terms of formatting because it does not recognise HTML markup. If this is important, consider an in-page alternative. A quick web search turned up the following:
http://www.jondavis.net/codeprojects/jqalert/
Sorry, but in JavaScript, you can only use plaintext alerts. Now, you can use \n for a newline, by the way, but the alert() function only allows plaintext. Again, sorry.
精彩评论