Home  >  Article  >  Web Front-end  >  Discussion on examples of attention issues when splicing js into html_javascript skills

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

WBOY
WBOYOriginal
2016-05-16 16:41:561197browse

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>';

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>';

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>

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="53a12f3c74a42722e5c409474c6b3abd";

Statement:
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