# re: 在javascript里 有關 indexOf 或者 startsWith 或者 endsWith 這樣的方法 回復 更多評論
2008-07-09 10:39 by
function checkSize(str){
if(str.indexOf(' ')>=0){
alert("不能含有空格");
}
# re: 在javascript里 有關 indexOf 或者 startsWith 或者 endsWith 這樣的方法 回復 更多評論
2009-07-06 11:12 by
@hello
開頭有空格,indexOf(" ")是等于0的
# re: 在javascript里 有關 indexOf 或者 startsWith 或者 endsWith 這樣的方法 回復 更多評論
2010-09-23 21:21 by
奇怪個球.indexOf()是從0開始計數的.
你的文章有點讓人哭笑不得.
# re: 在javascript里 有關 indexOf 或者 startsWith 或者 endsWith 這樣的方法[未登錄] 回復 更多評論
2011-09-23 23:00 by
樓主,我覺得你不適合從事程序員這個行業。趁早轉行吧,別害人害己了。
# re: 在javascript里 有關 indexOf 或者 startsWith 或者 endsWith 這樣的方法 回復 更多評論
2013-09-27 14:54 by
樓主好2B,
.indexOf() 返回的是下標。。。不懂裝懂