快捷操作$.get()..$.post()...
写法:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <script> $.ajax({ url:"url", type:"get", dataType:"json", data:{ userID:"1" }, success:function(response){ }, error:function() { } }); $.get( "url", {userID:"123"}, function(response) { } ) $.post( "url", {userID:"123"}, function(response) { } ) </script> </head> <body> </body> </html>