adi*_*med 3 javascript asp.net jquery
嗨,我div(divNotify)在主页上有一些信息和计时器的通知
Protected Sub Timer_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Try
Me.GetNotification_Stats()
ScriptManager.RegisterClientScriptBlock(Me.Page, GetType(String), "Alert", "Show_NotifyDiv();", True)
Catch ex As Exception
Me.lblError.Visible = True
Me.lblError.InnerText = ex.Message
End Try
End Sub
Run Code Online (Sandbox Code Playgroud)
divNotify将在某段时间内显示.
在这里我需要当用户最小化浏览器时,他将通过闪烁浏览器和更改浏览器的颜色来通知他
但首先我如何知道浏览器是否最小化在javasript这里我使用jquery为show div标签
function Show_NotifyDiv() {
$("#div_NotificationOuter").show(1000);
$("#div_NotificationOuter").animate({ bottom: '+=30px' }, 4000);
}
Run Code Online (Sandbox Code Playgroud)
无法确定页面是否通过JavaScript 最小化,但您可以使用Visibility API来确定页面是否对用户可见.
目前可在Chrome,Mozilla和IE10中使用.
| 归档时间: |
|
| 查看次数: |
3871 次 |
| 最近记录: |