Home > Web Front-end > JS Tutorial > Rookie javascript basic information compilation 2_basic knowledge

Rookie javascript basic information compilation 2_basic knowledge

WBOY
Release: 2016-05-16 18:14:30
Original
1022 people have browsed it

1.
//Use the attributes of variables




2.
//Convert all letters in the string to uppercase letters.




3.
//Add a hyperlink to a variable in js



4.
//indexOf method (locates the position where a specified character first appears in the string. If not found, returns -1, case sensitive)



5.
//match() method
//Use match() to find a specific character in a string, and if found, return this character.




6.
//replace() method replaces certain characters with other characters in a string.
var str="Visit Microsoft!"
document.write(str.replace("Microsoft","W3School"))

")
7. //Merge the two Array
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