Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我无法设置跨度标签的标题属性...我正在使用以下代码
$('.className').find("span").attr("title",'Some_text');
它不工作...
也许问题是您正在类中搜索 span 元素,这对您有用。
$('span.className').attr('title','New Title');
在这里,您将标题应用于该类的所有 span 元素。
希望它可以帮助你。
小提琴
i get an error in chrome:
Uncaught TypeError: Object s1A has no method 'applyToSelection'
in Firefox(firebug) i get this:
TypeError: val.applyToSelection is not a function