html(../Home/Index.cshtml)
<body>
<button class="Btn">按钮</button>
</body>
js
$(document).ready(function () {
$(".Btn").click(function () {
$.getJSON("../Home/Index",function (data) {
for (var i = ; i < data.length; i++) {
var obj = data[i];
alert(obj);
}
});
});
HomeController
public ActionResult Index(string url)
{
ArrayList list = new ArrayList() {"","","" };
return Json(list,JsonRequestBehavior.AllowGet); ;
}