【发布时间】:2013-09-03 12:30:46
【问题描述】:
text = child.html()
text = text.replace /(#include(\s*<.*>)?)/gi, '<span>$1</span>'
text = text.replace /(main\(.*\))/gi, '<span>$1</span>'
child.html text
http://jsfiddle.net/dcro/XKHC8/
这是我的问题的答案:Wrapping strings with a span我不知道如何使用咖啡脚本,并且回答的人看起来不可用。
【问题讨论】:
-
js2coffee.org 是一个翻译网站
-
所有你需要做的就是在函数调用中添加括号(html和replace)
-
语法错误缺少操作数..
-
@BarbaraLaird 该站点与此处需要的相反...
-
@Oleh - 有 2 个选项卡,你可以选择任何一种方式
标签: javascript jquery coffeescript