开发者

how to call alert box using jsp

开发者 https://www.devze.com 2022-12-17 02:59 出处:网络
I am facing problem while calling the alert box. Can I know what is the procedure to call the box in JSP?

I am facing problem while calling the alert box. Can I know what is the procedure to call the box in JSP?

My function is

<script type="text/javascript" src="js/ufo.js"></script>
<script  type="text/javascript">
    function foon() {
        alert("Sorry! you are not a valid user!! click here to go开发者_如何学C back to login!!!");
        history.back(1);
    }
</script>

Now how to call foon() function inside if statement?


Probably you want something like:

<c:if test="something"><script type="text/javascript">foon()</script></c:if>

Alternately you could embed your alert right there, depends on your need to reuse.

0

精彩评论

暂无评论...
验证码 换一张
取 消