Re: [問題] JQuery form serialization

看板Ajax作者 (巧虎)時間11年前 (2014/03/13 05:57), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串2/2 (看更多)
※ 引述《shomingchang ( )》之銘言: : 想請問為何 var formData = $('#testform').serialize(); 序列化出來的資料是空的? : 感謝大家 : <!DOCTYPE html> : <html xmlns="" rel="nofollow">http://www.w3.org/1999/xhtml"> : <head> : <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> : <title></title> : <script src="Scripts/jquery-2.1.0.js"></script> : <script type="text/javascript"> : $(document).ready(function () { : $('#btnSerialize').on('click', Serialize); : $('#btnDecode').on('click', Decode); : }); ...[恕刪] 擷取片段的jQuery(v2.0.3)的程式碼: // Serialize the form elements jQuery.each( a, function() { add( this.name, this.value ); }); 由此可知,jQuery是使用name來取得elements的值 -- Xuite 板看 icydream 者作 格落部的我 [報情] 題標 2008 00:00:00 1 Jun Tue 間時 ─────────────────────────────────────── My Blog -> http://blog.xuite.net/icydream/feeling -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 119.14.60.11

03/13 06:44, , 1F
了解 感謝
03/13 06:44, 1F
文章代碼(AID): #1J8DXE9G (Ajax)
討論串 (同標題文章)
文章代碼(AID): #1J8DXE9G (Ajax)