ajax 高度封装的函数

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Title</title>
</head>
<body>
<script src="jquery-1.12.4"></script>
<script>

// $.get('json.php', { id: 1 }, function (res) {
// console.log(res)
// })

// $.post('json.php', { id: 1 }, function (res) {
// console.log(res)
// })

// $.getJSON('json.php', { id: 1 }, function (res) {
// console.log(res)
// })


// 明确请求的方式 根据方式选择快捷方法

</script>

</body>
</html>
原文地址:https://www.cnblogs.com/lujieting/p/10291404.html