Home > Web Front-end > JS Tutorial > body text

Summary of common javascript methods_javascript skills

WBOY
Release: 2016-05-16 18:51:52
Original
1000 people have browsed it
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:
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template