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

Application of '=' in JavaScript_javascript skills

WBOY
Release: 2016-05-16 19:19:50
Original
2290 people have browsed it

Additive assignment operator (=). Adds the variable value to the expression value and assigns the sum to the variable.
It is often used when writing JavaScript. To be honest, I didn’t understand it very well before. After reading a lot of code, I feel that it is just because a variable is too long that it needs to be written in several lines. But it solved my other problems.
Sometimes we need to use a series of HTML codes as variables, and HTML sometimes contains some quotation marks. For example,

Copy code The code is as follows:

var Nameform='
';

At this time you will find that the problem of quotation marks has always troubled you. At this time, using '=' will solve the problem.
Copy code The code is as follows:

var Nameform='
Nameform ='Please enter the placemark name here';
Nameform ="'";
Nameform ='"/>
';
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