發表文章

目前顯示的是有「webmethod」標籤的文章

ASP.NET透過jQuery Ajax不斷更新呼叫WebMethod存取套用jQuery Sortable效果的DIV內項目順序列表

圖片
  首先先有辦法在drag放置完取得順序列表 See the Pen jQuery Sortable Test by Jacob ( @dryjoker ) on CodePen . 在前台stop方法裏頭包覆傳遞order list的ajax呼叫 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 $ . ajax ({ type : "POST" , url : "../SubWin/PatentDeDup.aspx/SaveOrderList" , contentType : "application/json;charset=utf-8" , data : '{order_list: "' + sort_id + '" }' , dataType : "json" , success : function ( data ) { if ( data . d == "success" ) { console . log ( "save order list successfully" ); } else { //alert(data.d); console . log ( "save order list not return success" ); console . log ( data . d ); } }, error : function ( result ) { alert ( "API Error" ); } }); 後端aspx.cs 1 2 3 4 5 6 7 8 [System.Web.Services.Web...