MozTW 討論區 https://forum.moztw.org/ |
|
在split在這個function出了問題 https://forum.moztw.org/viewtopic.php?f=18&t=2953 |
第 1 頁 (共 1 頁) |
發表人: | Abomination [ 2004-08-30, 21:17 ] |
文章主題 : | 在split在這個function出了問題 |
我試著在 paste and go 加入字串過濾space和newLine的功能 我加入了這個function: 代碼: function urlfilter(str) {
var result = ""; if (!str) { alert("this shouldn't happen"); return } var temp = str.split(' '); for ( i = 0; i < temp.length; i++ ) { result += temp[i]; } return result; } 但是總在 var temp = str.split(' '); 這一行中斷 請問是錯在哪裡 我內嵌在html的測試為正確 不懂為什麼不能直接用在extens ![]() 不知道PO在這會不會有人看 ![]() |
第 1 頁 (共 1 頁) | 所有顯示的時間為 UTC + 8 小時 |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |