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>
        
    
  • 相关阅读:
    docker运行爬虫代码
    python语法之流程控制(if while for)
    python基本数据类型
    python基本运算符
    python用户交互与格式化输出
    jieba模块基本介绍
    wordcloud库基本介绍
    计算机基础之编程语言
    计算机基础
    python入门之流程控制
  • 原文地址:https://www.cnblogs.com/wucg/p/1921700.html
Copyright © 2011-2022 走看看