strVariable.substring(start, end)
"String Literal".substring(start, end)参数
start 
指明子字符串的起始位置,该索引从 0 开始起算。 
end 
指明子字符串的结束位置,该索引从 0 开始起算。 
说明
substring 方法将返回一个包含从 start 到最后(不包含 end )的子字符串的字符串。substring 方法使用 start 和 end 两者中的较小值作为子字符串的起始点。例如, strvar.substring(0, 3) 和 strvar.substring(3, 0) 将返回相同的子字符串。
如果 start 或 end 为 NaN 或者负数,那么将其替换为0。
子字符串的长度等于 start 和 end 之差的绝对值。例如,在strvar.substring(0, 3) 和 strvar.substring(3, 0) 返回的子字符串的的长度是 3。

解决方案 »

  1.   

    iTimerID = window.setTimeout(vCode, iMilliSeconds [, sLanguage])ParametersvCode Required. Variant that specifies the function pointer or string that indicates the code to be executed when the specified interval has elapsed. 
    iMilliSeconds Required. Integer that specifies the number of milliseconds. 
    sLanguage Optional. String that specifies any one of the possible values for the LANGUAGE attribute. Return ValueInteger. Returns an identifier that cancels the evaluation with the clearTimeout method.