标签:status document cli stat 传递数据 cti pts log view
html
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width,initial-scale=1.0" /> <title></title> <link type="text/css" href="~/Content/bootstrap.min.css" rel="stylesheet"/> <script type="text/javascript" src="~/Scripts/jquery-1.10.2.min.js"></script> <script type="text/javascript" src="~/Scripts/bootstrap.min.js"></script> <script type="text/javascript" src="~/Scripts/Home/Main.js"></script> </head> <body> <button class="Btn">按钮</button> </body> </html>
Main.js
$.get()的使用
$(document).ready(function () {
$(".Btn").click(function () { $.get("../Home/Index", function (data, status) { alert("数据:" + data + ";状态:" + status); }); });
});
$.post()的使用
$(document).ready(function () { $(".Btn").click(function () { $.post("../Home/Index", { name: "ww", url:"http://www.baidu.com", }, function (data, status) { alert("数据:" + data + ";状态:" + status); }); }); });
JQuery------$.get()和$.post()传递数据的使用方法
标签:status document cli stat 传递数据 cti pts log view
原文地址:http://www.cnblogs.com/tianhengblogs/p/5991753.html