zoukankan      html  css  js  c++  java
  • 等待Ajax结果 再提交表单(ajax同步)

    第一种方法:

    如果使用的提交按钮是button 不是submit 以及服务器控件  可以在ajax返回结果之后document.getElementById('form').submit();

    第二种:

    function BeginSubmit() {
                var txt = "";
                jQuery.ajax({
                    type:"POST",
                    async:false,//是否异步   
    url:
    "GetTotalAmount.aspx", success:function(result){ if (result.text == "false") { DIVAlert('alert', 'Valor\'s Minimum Order Policy is $25.00. We welcome you to continue to browse and shop on our website, and thank you for your business!', null, null); return false; } else { if (validateForm() && GetTotalAmount()) { if (jQuery('[name=outOfStack]').length > 0) { if (!confirm('Out of stock Or offline products will add to backorder,Do you want to submit Order?')) return false; } else { if (!confirm('Do you want to submit Order?')) return false; } } else { return false; } ProcessOrder(); } } }) }
  • 相关阅读:
    mysql perl 抓取update语句
    $/ 改变换行符
    $/ 改变换行符
    java读取jpg图片旋转按比例缩放
    感应器
    lisp分支
    鸡肋的Drools
    postgre去重复记录
    拖拽到指定位置
    base64coder调用
  • 原文地址:https://www.cnblogs.com/wugang/p/2923217.html
Copyright © 2011-2022 走看看