js的append拼接html丢失css样式解决

                            htmlApp += "
  • "; htmlApp += ""; htmlApp += "第"+lunci+"轮"; htmlApp += "\n"; htmlApp += ""; htmlApp += ""+numqiu+""; htmlApp += "\n"; htmlApp += ""; htmlApp += ""+memnickname+""; htmlApp += "\n"; htmlApp += "
  • \n"; $("#yaohaojieguo").append(htmlApp);

      浏览器解析的问题,每一个标签后面添加/n就可以解决问题。

    转载于:https://www.cnblogs.com/guokai870510826/p/8179711.html

    你可能感兴趣的:(javascript)