Windows.reload不会停止重新加载 [英] Windows.reload not stop reloading

查看:166
本文介绍了Windows.reload不会停止重新加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计们,我有一条警报消息,如果满足条件就会触发,我的一个警报需要在警报消息后重新加载页面。但我所做的代码并没有停止一次又一次地重装。这是我的代码:



我尝试过:



Hey guys i have an alert messages that will fire if an condition is satisfied and one of my alert will need reload the page after the alert message. but the code i've make is not stopping from reloading again and again. here's my code:

What I have tried:

If totalpercentage < 100 Then
          ClientScript.RegisterStartupScript(Me.GetType, "alert", "alert('Grade Components Must Be Equal to 100%');", True)
      ElseIf totalpercentage > 100 Then
          ClientScript.RegisterStartupScript(Me.GetType, "alert", "alert('Grade Components Must Be Equal to 100%');", True)
      Else
          ClientScript.RegisterStartupScript(Me.GetType, "alert", "alert('Success');window.location.reload();", True)
          updateww()
          updatept()
          updateqa()

      End If

推荐答案

让我们看看...

如果 totalpercentage == 100比编写脚本显示某些消息而不是重新加载页面...但现在 totalpercentage 仍然是== 100所以你再次编写那个脚本等等......

你必须考虑一下!为什么要100%重新加载页面?
Let see...
If totalpercentage == 100 than you write a script to display some message and than reload the page... But now totalpercentage is still == 100 so you write that script again and so on...
You have to think about it! Why do you reload the page on 100%?


这篇关于Windows.reload不会停止重新加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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