How to solve the conflict between single and double quotes in js, think of the following code:
This is the code in js. If it is written like this, a js error will be prompted because the parameters in the removeOpenCss method do not have single or double quotes. If it is written like this here:
An error will be reported directly because single quotes and double quotes conflict here, so I The only solution is this:
In JS, an error usually occurs when two layers of double quotes are nested
The following method can be used to solve the problem
Replace the inner single quotes with '
Replace the double quotes with "
As shown in the following example