开发者

Bullet points in Warning Message box for a web page

Is it possible to add Bullet points for the warning/Alert message box for a webpage using HTML and Java Script? If not, what would be the best possbile way to create one of those?

The message box should have the below properties:

  1. Warning Image
  2. Message box开发者_开发问答 header
  3. Bullet points listing summary
  4. Accept and Reject button

Thanks in advance!!


Just an update on this, you can create a bullet in a JavaScript alert box, you just need to use \u2022, so your script would be something like this (\n is a line break):

alert("!!! WARNING !!!\n\nHeader\n\u2022Point1\n\u2022Point2")

This will display (in an alert box):

!!! WARNING !!!

Header

  • Point1
  • Point2


The standard confirm function cannot do all this; instead, you can use jQuery UI Dialog.


There may be a way to sneak bullet points into an alert() box using some Unicode shenanigans, but in general, these boxes can not be styled. Individually labeled buttons are totally out of the question.

You would have to use a custom-made library like JQUery UI dialogs. Alternatively, here is a more light-weight tutorial on building custom alert boxes.


I believe you need to develop a custom alert box. I may develop it using jQuery colorbox. or jQuery UI Dialogs

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜