setAttribute("class", "current")
 发布于 10 年前  作者 mmXiaoYao  3711 次预览  最后一次回复是 10 年前  来自 问答 

请问juery中setAttribute(“class”, “current”)和$!{rootPath}index怎么理解?

5 回复
leapon

那个{root Path}不像是jquery里的。像是模版里的变量替换

leapon

setAttribute 是该html node的attribute。多看看文档

mmXiaoYao

@leapon 对,rootPath是自定义变量,想问一下index写在大括号{}外面代表什么意思呢~

leapon

@mmXiaoYao 贴一下上下文吧。估计用了某个template engine。要结合起来才能看明白。