Home >Web Front-end >JS Tutorial >Summary of common javascript methods_javascript skills

Summary of common javascript methods_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:51:521020browse
1.replace()
Example:

2.search()

Example:

3.slice() selects a part of a string from a string and generates a new string

Example:

4.match() from a string Search for the specified value in, it returns the specified value, not the position of the specified value, which is different from search
Example:

6.lastIndexOf() gets The position of the value to be queried in this string. If it does not exist, -1 will be returned Example:
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn