前台JS代碼$.post(/Book/GetBookClassIDByName, { BookName: "旅遊手冊" }, function (data) { if ...
前台JS代碼
$.post('/Book/GetBookClassIDByName', { BookName: "旅遊手冊" }, function (data) {
if (data != 0) { if (parseInt($("#BookClassID").val()) == data) { $("#dinfo").find("h4").html("旅遊手冊-進階資料"); $("#trTeamNo").show();
//$("#trTeamNo").attr("style", ""); } else { $("#trTeamNo").hide(); //$("#trTeamNo").attr("style", "display: none"); $("#dinfo").find("h4").html("代編-進階資料"); } } else { $("#trTeamNo").hide(); //$("#trTeamNo").attr("style", "display: none"); $("#dinfo").find("h4").html("代編-進階資料"); } });
後台controller代碼:
public JsonResult GetBookClassIDByName(get='_blank'>string BookName)
原标题:將後台的Json數據返回到前台
关键词:JS
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。