看板 [ Ajax ]
討論串[ js ] 有關 function return string的問題
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓1(1推 0噓 1→)留言2則,0人參與, 最新作者TonyQ (沉默是金。)時間15年前 (2010/05/09 17:48), 編輯資訊
0
0
0
內容預覽:
引述《ot32em (reverse(wasefo);)》之銘言:. 當然 accountCheck 沒有 return 值是個問題,不過非同步也有關系,. 不過非同步在你修正之後的sample就有影響了;. 因為預設是非同步的話,你return_data還沒取得資料前,. accountChe
(還有288個字)

推噓1(1推 0噓 1→)留言2則,0人參與, 最新作者evernever (!!M)時間15年前 (2010/05/09 17:20), 編輯資訊
0
0
0
內容預覽:
試試看這樣子. function accountCheck(a,callback) {. // ..... //. $.post('fetch.php', /* ... */ , function(data) {. callback(data);. });. }. $('#register_subm
(還有64個字)

推噓0(0推 0噓 14→)留言14則,0人參與, 最新作者ot32em (reverse(wasefo);)時間15年前 (2010/05/08 13:44), 編輯資訊
0
0
0
內容預覽:
$(document).ready(function(){. .... function accountCheck(a){. if( a.length < 3 ) return 'short';. if( a.length > 11) return 'long';. $.post('fetch.ph
(還有379個字)
首頁
上一頁
1
下一頁
尾頁