如何在使用< p:message>时自动隐藏/关闭错误消息? [英] How to hide / close the error message automatically while using <p:message>?

查看:116
本文介绍了如何在使用< p:message>时自动隐藏/关闭错误消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这样的规范,当由于验证消息或其他原因显示错误消息(在使用<p:message>时)时,它应该在一段时间后自动关闭.

I have this specification that when error message is displayed (while using <p:message>) due to validation message or some thing else it should close after sometime automatically.

我该怎么做?

我使用的是素字

请给我一个解决办法

推荐答案

您可以使用jQuery.尝试组合功能delay()hide().这里是链接: 隐藏延迟.

You can use jQuery for that. Try to combine functions delay() and hide(). Here are links: hide and delay.

这篇关于如何在使用&lt; p:message&gt;时自动隐藏/关闭错误消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆