菜鸟问indexof('@',0)是什么意思???
菜鸟问indexof('@',0)是什么意思??? 问题点数:20、回复次数:5Top
1 楼cpplus(技术就是要坚持)回复于 2001-12-21 11:16:11 得分 5
[JScript]
public function IndexOf(
source : String,
value : Char
) : int;
Parameters
source
The String to search.
value
The character to locate within source.
Return Value
The zero-based index of the first occurrence of value within the entire source, if found; otherwise, -1.
Top
2 楼silentlamb(silent)回复于 2001-12-21 11:41:40 得分 5
cpplus(百合)你的这段东东是哪里来的?自己定义的函数?
系统提供的只有indexOf()函数呀Top
3 楼lazywolf(二代)回复于 2001-12-21 11:42:52 得分 10
indexof('@',0)是指在一个字符串中从0位置开始搜索'@',如果找到返回@所在的位置,否则返回-1
例:
var str1 = "sdfdfs@123";
var s = str1.indexOf('@',0);
s为返回'@'所在位置的值Top
4 楼smf_13(天涯人)回复于 2001-12-21 11:45:44 得分 0
谢谢楼上各位。。。Top
5 楼cpplus(技术就是要坚持)回复于 2001-12-21 11:50:08 得分 0
to:silentlamb(silent)
这个就是帮助里啊~~MSDN JULY 2001 EDITIONTop




