zoukankan      html  css  js  c++  java
  • ajax post submit

    <!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> <title></title></head><body> <script src="Scripts/jquery-1.4.4.min.js" type="text/javascript"></script> <script type="text/javascript"> $.ajax({ url: "http://192.168.1.xx:xxx/xx//user_delete.action", data: { uid: 36 }, dataType: "json", type: "post", timeout: 5000, success: testDelete, error: testError }); function testError(result) { alert(result); } function testDelete(result) { if (result.result == 0) { alert("删除失败……"); } else if (result.result == 1) { alert("success"); } }
    </script></body></html>

  • 相关阅读:
    Promise
    ajax基础
    flex布局的盒子模型
    css3核心模块
    响应式开发
    HTML5标签及表单
    JS面向对象编程
    JS面向对象的编程
    ES5构造函数与ES6类
    类欧几里得算法
  • 原文地址:https://www.cnblogs.com/chinaniit/p/1920757.html
Copyright © 2011-2022 走看看