源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

js拼接html注意问题示例探讨

  • 时间:2021-01-23 14:14 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:js拼接html注意问题示例探讨
你想让别人给你解决什么, 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]。用法完全不对。
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>';
追问 我是想把
<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>
这句外面加个单引号,可是试了好多次都不成功,这句话加上单引号,里面改怎么变化呢 回答 用转义符, \" = ", \' = ' 追问 转义符不太会用,能给个列子吗 回答 var zz ="<tr style=\"height:25px\">";
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部