如何自定义警报框的位置 [英] How to customize the position of an alert box
问题描述
我使用警告框在一些验证后提醒某些邮件。
现在我想让控件上的警告框位置有一个验证
错误。
I am using an alert box to alert some messages after some validation. Now I want to make alert box position over the control where it had a validation error.
默认情况下,弹出一个警告框在页面中间,
现在我想要在一些自定义位置,
例如我有4个文本框要验证,textbox-3有一些不正确的数据,
我想要的警报
As a default, an alert box pops up in center of page, Now I want it at some custom position, for example I have 4 textbox to be validated, textbox-3 has some incorrect data, I want the alert to be presented just above the textbox-3 instead of center of page.
这是否可以更改警报框的显示行为?
Is this possible to change the display behavior of alert box? If there's no other option to go for jquery dialog box.
推荐答案
因为这是一个默认的对话框,你不能定位。但是,您可以设计自己的自定义警报框和位置。或者,您可以使用第三方对话框,jquery ui有一个很好的一个: http://jqueryui.com/dialog/
Since that is a default dialog box, you cannot position that. However, you can design your own custom alert box and position that. Or, you can use 3rd party dialog boxes, jquery ui has a nice one: http://jqueryui.com/dialog/
这篇关于如何自定义警报框的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!