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

Discussion on examples of attention issues when splicing js into html_javascript skills

WBOY
Release: 2016-05-16 16:41:56
Original
1192 people have browsed it

What do you want others to solve for you?
What is adress?

var hrf='<a href="javascript:;" rel="external nofollow" rel="external nofollow" onclick="window.open('+url+','','"height=625,width=830,toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no"')">'+adress+'</a>';
Copy after login

Adress[j] appears again below. The usage is completely wrong.

msg+='<tr style="height:25px"><td align ="left" style="width:6%;color:Black">'+coal[j]+'</td><td align ="left" style="width:8%;color:Black">'+url+hrf+'</td><td align ="left" style="width:24%;color:Black">'+adress[j]+'</td><td align ="left" style="width:12%;color:Green;font-weight :bold">'+ssz[j]+'</td>';
Copy after login

Follow up questions

I want to

<a href="javascript:;" rel="external nofollow" rel="external nofollow" onclick="window.open('+url+','','"height=625,width=830,toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no"')">'+adress+'</a>
Copy after login

Add single quotes outside this sentence, but I have tried many times without success. How can I change the inside of this sentence after adding single quotes?

Answer

Use escape characters, " = ", ' = '

Follow up questions

I’m not very good at using escape characters, can you give me an example

Answer

var zz="";

Related labels:
js
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