一个按钮同时触发二个验证JS函数

来源:互联网 发布:手机英文汉化软件 编辑:程序博客网 时间:2024/04/30 19:03
<script type="text/javascript"><!--google_ad_client = "pub-3410656662926364";google_ad_width = 300;google_ad_height = 250;google_ad_format = "300x250_as";google_ad_type = "text_image";//2006-11-18: blog.sqlsky.comgoogle_ad_channel = "1979996193";google_color_border = "ffffff";google_color_bg = "ffffff";google_color_link = "a1864c";google_color_text = "a1864c";google_color_url = "008000";//--></script><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Public_Test_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    <script type="text/javascript">
        function myFunc1(){
            alert("你好,myFunc1111!");
            return false;
        }
       
        function myFunc2(){
            alert("你好,myFunc2222!");
            return true;
        }
       
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:Button ID="btnSave" runat="server" Text = "测试函数" OnClientClick="return myFunc1()&myFunc2()" />
    </form>
</body>
</html>