Is there any way to change style of text, format the text inside a Javascript Alert box. e.g. changing its colour, making it bold, etc.?

有没有办法改变文本样式,格式化Javascript警告框内的文本。例如改变它的颜色,使它变得大胆,等等?

Also, if there an Alert avalaible with a 'Yes', 'No' button instead of an 'OK'/'Cancel' one?

此外,如果有一个警报avalaible与'是','否'按钮而不是'确定'/'取消'按钮?

4 个解决方案

#1


No, I'm afraid that is not possible.

不,我担心这是不可能的。

With JavaScript, you are limited to only 3 popup boxes: alert, prompt and confirm.

使用JavaScript,您只能使用3个弹出框:警报,提示和确认。

If you want to make a more featured popup, you should try using one of the many that exist written in JavaScript, which are built from JavaScript Libraries, such as this

如果你想制作一个功能更强大的弹出窗口,你应该尝试使用JavaScript中编写的众多弹出窗口中的一个,它是从JavaScript库构建的,例如

更多相关文章

  1. 隐藏加载更多记录按钮ASP.net MVC Ajax Javascript
  2. 如何更改我的按钮文字?
  3. 单选按钮单击,隐藏/显示不工作
  4. 在Internet Explorer中使用sprited按钮和selection.createRange()
  5. 使用按钮单击按钮添加表格
  6. 具有相同名称的Mutiple按钮显示不同的div。
  7. 如何检查不包含提交按钮的HTML5表单的有效性?
  8. 当函数在单独的PHP文件中定义时,调用JavaScript函数onclick按钮事
  9. 由ajax [duplicate]生成时,formset的提交按钮不起作用

随机推荐

  1. python3生成10个成绩列表,求其平均分
  2. python使用urlopen需要导入什么库
  3. Python -在文本文件中添加日期戳
  4. Django反向url与参数到基于类的视图
  5. Python爬虫-尝试使用人工和OCR处理验证码
  6. leet240. 搜索二维矩阵 II
  7. re表达式中单引号内的双引号(python)[dupli
  8. Python基础 条件判断和循环
  9. Python爬虫之post请求
  10. Python3 基本数据类型