系统教程 行业动态 更新时间:2024-06-14 16:53:07
玉 - 如何用连字符表示属性?(Jade - how to denote an attribute with a hyphen?)

我想在jade模板中的标签上放置一个html5 data-attribute 。 我到底怎么做? 以下给出了语法错误。

script(data-main="public/javascripts" src="public/javascripts/require.js")

I would like to place an html5 data-attribute on a tag in a jade template. How on earth do I do this? The following gives a syntax error.

script(data-main="public/javascripts" src="public/javascripts/require.js")

最满意答案

这是正确的,但您需要在属性之间使用逗号。

script(data-main="public/javascripts", src="public/javascripts/require.js")

That is correct, but you need a comma between the attributes.

script(data-main="public/javascripts", src="public/javascripts/require.js")

更多推荐

本文发布于:2023-04-05 21:08:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/0af0e944eacece748a413b6f7cdb95fe.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!