提醒:Sequencing AJAX requests on "ask-first basis" 2011年07月16日

来自: juliklive
订阅:ibaobao
演示:以MSN订阅提醒为例 订阅到哪吒,有更新提醒我
哪吒机器人提醒:
提醒:juliklive
【标题】Sequencing AJAX requests on "ask-first basis"
【摘要】so imagine you have this autocomplete thingo. or a dynamic search field. anything that updates something via ajax when it's value changes.now, it's tempting to do this (i am speaking prototype.js here, jquery would be approximately the same. function updateresults(field) { new ajax.request('/s', { method:'get', parameters: {"term": field.value}, onsuccess: function(transport){ var archivelist = transport.responsetext.evaljson(); displayresults(archivelist); // this updated the dom } })... (07-16 05:49)
收藏 |  评论 |  推荐给好友  | 
本文共有 0 次分享
评论
共有 - 条评论


我要反馈