Bold, header effects in alert ()?

in javascript how to make warning bold n use h1-h5 headers? Is this possible or just one warning?

how to include bold and h1 in this warning?

function onlooad() { alert("wssup??"); } 
+4
source share
5 answers

You cannot use HTML in alert (). To do this, you need to use window.open () or some custom code, for example:
http://docs.jquery.com/UI/Dialog

+11
source

As far as I know, this is not possible.

+3
source

You can use custom elements that act as alerts. Check this.

jQuery Impromptu

+2
source

Javascript warning is limited in terms of formatting as it does not recognize HTML markup. If this is important, consider the alternative on the page. A quick search on the Internet showed the following:

http://www.jondavis.net/codeprojects/jqalert/

+1
source

Sorry, but in JavaScript you can only use text warnings. Now, for example, you can use \ n for a new line, but the alert () function allows only plaintext. Again, sorry.

0
source

Source: https://habr.com/ru/post/1307133/


All Articles