首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >如何在javascript中添加:之后

如何在javascript中添加:之后
EN

Stack Overflow用户
提问于 2018-08-19 02:16:53
回答 1查看 2K关注 0票数 2

html:

这就是我的东西

<div class="one"> Apple  </div>

我想用javascript .style添加“果汁”这个词。有没有可以用.style.after = "juice":: after中设置内容的与javascript等效的工具?

<div class="one"> Apple Juice </div>

js:

document.querySelector('.one').style.display ="inline";
document.querySelector('.one').style.marginLeft ="2px";
document.querySelector('.one').style. = 
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51911422

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档