zoukankan      html  css  js  c++  java
  • Asp.NET MVC ajax

    asp.net mvc js验证:

    jquery.validate.js

    <script type="text/javascript">
    $(function() {
    $("form").validate({
    errorClass: "field-validation-error",
    rules: {
    "pledge.SupporterName": { required: true, maxlength: 50 },
    "pledge.SupporterEmail": { required: true, email: true },
    "pledge.Amount": { required: true, min: 10 }
    },
    messages: {
    "pledge.Amount": { min: "Come on, you can give at least $10.00!" }
    }
    })
    });
    </script>
    
    
        <%-- 
        $("form[action$='GetQuote']").submit(function() {
            $.post($(this).attr("action"), $(this).serialize(), function(response) {
                    $("#results").html(response);
                });
                return false;
        });
    
        $("form[action$='GetQuote']").submit(function() {
            $.getJSON($(this).attr("action"), $(this).serialize(), function(stockData) {
                $("#openingPrice").html(stockData.OpeningPrice);
                $("#closingPrice").html(stockData.ClosingPrice);
                $("#stockRating").html(stockData.Rating);
            });
            return false;
        });
        --%>
        <%: Ajax.ActionLink("显示时间", "ShowMessage", new { username = "xxx" }, new AjaxOptions { Confirm = "确定吗", HttpMethod="Post" , UpdateTargetId = "divMsg", LoadingElementId = "dvLoading", OnSuccess="fun_suc", InsertionMode=InsertionMode.InsertAfter, OnBegin="fun_beg" })%>
        <div id="divMsg" style="border:1px solid red;"> </div>
        
    
  • 相关阅读:
    统计图配色方案_填充
    如何在C/S下打印报表
    如何利用API导出带有页眉页脚的excel
    通过ajax记录打印信息
    reportConfig.xml两种数据源连接的配置方式
    润乾填报页面导入excel后增加js动作
    matplotlib多plot可视化
    Python之SGDRegressor
    Python之岭回归
    Python之随机梯度下降
  • 原文地址:https://www.cnblogs.com/wucg/p/1921700.html
Copyright © 2011-2022 走看看