0

这是 Facebook 点赞按钮的代码:

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) {return;}
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=101562769948573";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<div class="fb-like" data-href="http://foodjing.com/" data-send="true" data-width="450" data-show-faces="true"></div>

我想用 Jade 写(因为我的索引是一个玉文件)。我该如何做到这一点?

4

2 回答 2

4

回复较晚,但您可能需要查看 http://html2jade.org/

于 2014-03-31T06:43:53.687 回答
3

查看玉文档。https://github.com/visionmedia/jade

我会建议你以下:

div#fb-root
script
(function(d, s, id) {
   var js, fjs = d.getElementsByTagName(s)[0];
   if (d.getElementById(id)) {return;}
   js = d.createElement(s); js.id = id;
   js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=101562769948573";
   fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

div.fb-like(data-href="http://foodjing.com/" data-send="true" data-width="450" data-show-faces="true")
于 2011-10-18T11:13:03.850 回答