子字符串substr函数和JS之间的区别 1。在JS函数声明:stringobject.substring(启动、停止) 起始是原始字符串检索的起始位置,停止是检索的终止位置,返回结果不包括停止引用的字符。 例如,汉堡包。Substring(4,8)返回冲动 2。substr(开始,长度) 例如,当detail_type值是1111053,substr(detail_type,1,6)= 111105 从detail_type首先需要六位字符。