[MVC3] jQuery Ajax+JSON (後端程式C#)
網頁:jQuery+ajax取得Controller所送過來的後端資訊(JSON)
後台:MVC架構,利用Controller取得物件資訊並轉換成JSON format回傳至網頁
網頁前端程式1:
透過ajax送出{欄位:參數}資訊至Controller端
取得result值(JSON Format)後,透過timetable轉成Html格式課表
$.ajax({
可手動更換jquery的版本<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script>
google.load("jquery", "1.6.2");
</script>
google.load("jquery", "1.6.2");
google api會載入以下lib
path: https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
path(u): https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js