javascript - 当我在 javascript 中使用 setAttributeNS 时,使用“”替换“”
问题描述
我需要用 javascript 添加这个属性和这个值:
routerLink='/panel/country/add'
但是当我在javascript中设置属性时:
let Link: string = "routerLink";
tailDiv.setAttributeNS(null, Link, this.subItems[i].route)
它使用“”但我需要''"/panel/country/add"
但我需要这个'/panel/country/add'
我怎样才能做到这一点?
解决方案
推荐阅读
- javascript - 未使用 JavaScript 建立 WebSocket 连接
- reactjs - 找不到模块:无法解决“react-bootstrap”问题
- angularjs - 在Typescript中以json格式访问对象中的对象
- java - 如何获得 ConstraintViolation
- javascript - Reactjs 类与 javascript 类
- java - 将 spring boot 从 2.0.0 升级到 2.1.1 后未加载 application-test.properties
- php - c3条形图Y轴值固定值
- c# - TabControl 样式与 Binding 与 Direct Children 看起来不同
- c# - 无法为子游戏对象创建碰撞网格
- python - Django KeyError 'pk' POST 方法