Re: [問題] AJAX 能夠記錄 使用者的行為嗎?

看板Ajax作者 (中午外出)時間17年前 (2006/12/11 15:06), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
※ 引述《IamCobalt (Jihad & Crusade)》之銘言: : 如果我想要記下使用者有哪些行為 : 像是連結、打字、滑鼠點擊等等 : 不知道ajax是否可以做到呢? : 如果可以做到的話 : 能否給一些範例呢? : 感激不盡! 我想到的是 建立一個收集訊息的函數,然後所有的事件都會觸發它 例如說 function type_event_collector(obj){ //鍵盤在obj輸入 } function click_event_collectot(x, y, obj){ //滑鼠在obj物件按下 } function click_link(url){ //紀錄url,然後把頁面導過去 } 然後物件就寫類似這樣 <input type="text" onchange="type_event_collector(this)" /> <a href="javascript:click_link('Google" rel="nofollow">http://www.google.com/')">Google</a> 類似這樣子寫吧 當然最後就是送到你要收集資料的伺服器去存起來 可以用xmlhttprequest送過去 這方法好像有點土法煉鋼XD -- A lawyer does not work for only one client at a time, for example. While one case is waiting to go trial or have papers typed, the lawyer will never be idle for lack work. (Idle lawyers tend to become politicians, so there is a certain social value in keeping lawyers busy) --Operating System Principles, 7th -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.114.121.132
文章代碼(AID): #15VGDw5c (Ajax)
文章代碼(AID): #15VGDw5c (Ajax)