Jquery 弹出错误消息?

标签 jquery

对你来说可能是愚蠢的问题,但是,我正在努力提高我的 jquery 知识。我在警报框中显示错误消息。是否有任何标准 API 可以让程序员的生活变得简单。 我搜索了但没有找到..

我知道,我们可以通过使用 css 和 html 来做到这一点。但是,我正在寻找 jquery API。因此,我们可以简单地使用 API,而不是在 css 中编写代码。

如果您有任何建议,我很乐意按照您的建议进行尝试。 将不胜感激的帮助...

最佳答案

你可以看看jqueryui。该项目为您提供了应该执行您想要的操作的模式对话框。

http://jqueryui.com/demos/dialog/

来自 jqueryui 站点:

A call to $(foo).dialog() will initialize a dialog instance and will auto-open the dialog by default. If you want to reuse a dialog, the easiest way is to disable the "auto-open" option with: $(foo).dialog({ autoOpen: false }) and open it with $(foo).dialog('open'). To close it, use $(foo).dialog('close')

关于Jquery 弹出错误消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10696692/

相关文章:

javascript - 如何从外部关闭非模态覆盖对话框

javascript - jquery or not/Cross Browser Compatible iframe resize (IE, Chrome, Safari, Firefox)

asp.net - 如何使用 jQuery ajax 避免快速结果出现 "blinking"进度 div?

jquery - HTML5 Canvas 触摸事件在 iPad 或移动 safari 浏览器上偏移

javascript - JQuery比较输入值?

javascript - 如何禁用基于另一个选择选项的选择选项

javascript - 向图像添加点 - 初学者

ajax - jQuery ajax html 回调中的换行会导致错误

jquery - 使用触发器 ('reload' 进行 ajax 调用后 jqgrid 未重新加载)

javascript - 在javascript中解析具有未知字段名称的json数组