如何使面板动态闪烁? [英] How to make a panel blink dynamically?

查看:82
本文介绍了如何使面板动态闪烁?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个按钮'付费'和一个面板'Panel4',上面写着'请完全填写'。这个页面有

一些TextBox是由用户强制填写的。如果用户没有填写所有TextBoxs

,那么在付款按钮上单击Panel4即可显示。再次,如果用户单击Pay按钮而不填写所有内容,我希望此Panel4闪烁2-3次。



我尝试使用以下代码以编程方式但不闪烁。



I have a button 'Pay' and a panel 'Panel4' which reads 'Please fill completely'. This page has
some TextBox's to be compulsorily filled in by the user. If the user does not fill all TextBoxs
then on 'Pay' button click the Panel4 is made to display. Again if the user clicks the Pay button without filling all, I want this Panel4 to blink 2-3 times.

I tried with the following code programmatically but does not blink.

protected void BtnPay_Click(object sender, EventArgs e)// pay button
    {
        if (Panel4.Visible == true)// for blink purpose
        {
            int v_blink = 0;
            int v_count=0;
            while (v_count < 220000)
            {
                v_blink = v_blink + 1;
                if (v_blink == 2100)
                {
                    Panel4.Visible = false;
                    v_blink = 0;
                }
                else
                {
                    Panel4.Visible = true;
            }
                v_count++;
            }
        }

推荐答案

尝试使用JQuery FadeIn FadeOut方法



add-blinking-using-jquery-闪烁 [ ^ ]



或其他使用脉冲动画的方式



动画面板使用ajax动画 [ ^ ]
Try using JQuery FadeIn FadeOut methods

add-blinking-using-jquery-blinking[^]

Or other way using Pulse Animation

animating-panel-using-ajax-animation[^]


这篇关于如何使面板动态闪烁?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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