关于Java脚本以及如何在Web应用程序中使用它 [英] about java script and how to use it in web application

查看:93
本文介绍了关于Java脚本以及如何在Web应用程序中使用它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

请给我发送一些编码格式,该编码格式也说明如何在Web应用程序和窗口中使用Java脚本.

Hi all,

Plz send me some coding format that how to use java script in web application and window also.

推荐答案

尝试 ^ ].

Google是您的朋友.检查 [ ^ ].
Try this[^].

Google is your friend. Check this[^].


使用html复选框

take a html Check Box

<input type="checkbox" id="chk1" name="chk" />

//One button to call that script function 

<asp:LinkButton ID="lnk_Register"  OnClientClick="javascript:return validate();" runat="server" </asp:LinkButton>

//finally your javascript code 

<pre lang="xml"><script type="text/javascript">
        function validate() {

            if (document.getElementById(''chk1'').checked == true) {
                return true;
            }
            else {
                alert("You Must Agree To Terms");
                return false;
            }
        }
    </script>










您好,单击此处.您可以获得有关javascript
Hi, Click here. You can get a lot about javascript


这篇关于关于Java脚本以及如何在Web应用程序中使用它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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