# 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() 返回的是下标。。。不懂装懂