zoukankan      html  css  js  c++  java
  • form表单提交数据

    html:

    <!-- 表单数据-->
    <div id="">
       <form id="thenform1">
           <input type="hidden" name="page" value="1" />
       </form>
    </div>

    js:

    data = $("#thenform1").serializeArray(); //获取所有form表单条件
    $.ajax({
     url:url,
     type: "get",
     //这里是重点
     xhrFields: { //允许添加cookie
       withCredentials: true
     },
     dataType: "json",
     data:data,
     success:function(res){},
       error:function(err){console.log(err)}
    })
    
      
  • 相关阅读:
    数论
    平衡树
    矩阵儿快速幂
    分治
    考试
    考试
    匈牙利算法
    SPFA
    倍增
    MySql 技术内幕 (数据库组成和引擎)
  • 原文地址:https://www.cnblogs.com/hongrun/p/14667809.html
Copyright © 2011-2022 走看看