Home >Web Front-end >JS Tutorial >Discussion on examples of attention issues when splicing js into html_javascript skills
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";