<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="JQueryPro._Default" %>

<!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 runat="server">
    <title>JQuery测试</title>
    <script type="text/javascript" charset="gb2312" src="Js/jquery3.2.js"></script>
</head>
<body>
    <form );
}
function ajaxPost()
{
$.post('ajax.aspx', {

id: 'my string',

number: 23

}, function(data) {

alert(data+'Your data has been saved.');

});

}
function ajaxGet()
{
//'xml',
$.ajax({

url: 'Ajax.aspx?id=123',

type: 'GET',

dataType: 'text',

timeout: 1000,

error: function(){

alert('Error loading XML document');

},

success: function(xml){
alert(xml);
// do something with xml

}

});

}

相关文章:

  • 2021-05-26
  • 2021-12-13
  • 2021-05-19
  • 2021-09-15
  • 2021-11-14
  • 2021-11-05
  • 2021-11-19
猜你喜欢
  • 2021-05-31
  • 2022-01-17
  • 2022-02-06
  • 2021-11-04
  • 2021-11-21
相关资源
相似解决方案