看板 Ajax 關於我們 聯絡資訊
http://tinyurl.com/28sok3s 有介紹,有關 data link ,template,mobile 等項目。 其中template 因為過去已經有相關 plug-in 相信大家不算陌生, 我最關注的是 data link , 因為這也是一個概念簡單, 卻大幅簡化開發程序的強大武器。 看上面的 sample 搞不懂在幹麼的, 可以看看這個 api 討論的 demo。 http://api.jquery.com/link/ 他可以把form或者特定的元件跟一個 js object 繫結(binding)起來, 當輸入元件改變時,對應的 js object 內容跟著異動, 也可以作到異動完之後更新另一個顯示元件,是個非常powerful 的功能。 想想看過去我們要寫一堆類似這樣的東西 var username = $("[name=username]").val(), useraccount = $("[name=useraccount]").val(); alert(username); alert(useraccount); 現在透過這 plug-in 我們將有機會可以改寫成 var user ={}; $("#theform").link(user); alert(user.username); alert(user.useraccount); 光想到就覺得令人興奮 :D -- I am a person, and I am always thinking . Thinking in love , Thinking in life , Thinking in why , Thinking in worth. I can't believe any of what , I am just thinking then thinking , but worst of all , most of mine is thinking not actioning... -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 111.82.21.118 ※ 編輯: TonyQ 來自: 111.82.21.118 (10/07 04:27)
mintle:GJ 10/07 12:46
kewang:推這篇! 10/07 21:16
foreverangle:GJ~!!! 10/07 21:32
iam87king:興奮+1 10/09 22:22