看板
[ Ajax ]
討論串[ js ] 有關 function return string的問題
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁
內容預覽:
※ 引述《ot32em (reverse(wasefo);)》之銘言:. 當然 accountCheck 沒有 return 值是個問題,不過非同步也有關系,. 不過非同步在你修正之後的sample就有影響了;. 因為預設是非同步的話,你return_data還沒取得資料前,. accountChe
(還有288個字)
內容預覽:
試試看這樣子. function accountCheck(a,callback) {. // ..... //. $.post('fetch.php', /* ... */ , function(data) {. callback(data);. });. }. $('#register_subm
(還有64個字)
內容預覽:
$(document).ready(function(){. .... function accountCheck(a){. if( a.length < 3 ) return 'short';. if( a.length > 11) return 'long';. $.post('fetch.ph
(還有379個字)
首頁
上一頁
1
下一頁
尾頁