对你来说可能是愚蠢的问题,但是,我正在努力提高我的 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/