zoukankan      html  css  js  c++  java
  • JQuery_AJAX简单笔记

    上代码:

     1  <script type="text/javascript">
     2 
     3         //Ajax方法
     4               $.ajax({
     5                    type: "post",
     6                    cache: false,       
     7                    url: "Handler1.ashx",
     8                    data: "name=小明&age=13",
     9                    success: function f(e) {
    10                        $("#btn").click(function () { 
    11                             alert(e)
    12                         })
    13                     }
    14                 });
    15 
    16 
    17 //        //post和get方法一样用法
    18         $(function () {
    19             $.ajaxSetup({
    20             cache:false
    21             })
    22             $("#btn").click(function () {
    23                 $.get("Handler1.ashx", { "name": "小红", "age": "18" }, function (e) {
    24                     alert(e);
    25                 })
    26                 //load  载入远程 HTML 文件代码并插入至 DOM 中。
    27                 $("#d").load("Handler1.ashx", { "name": "小红", "age": "18" })
    28             })
    29 
    30            
    31 
    32         })
    33 
    34        
    35        
    36     </script>
  • 相关阅读:
    Dialog对话框
    Intent的七大属性
    Activity启动模式
    Android知识体系
    Activity生命周期
    Intent实现页面跳转和传值
    Android超链接
    上传文件
    XMLSAX解析
    XmlPull
  • 原文地址:https://www.cnblogs.com/xujingyang/p/5560669.html
Copyright © 2011-2022 走看看