similar.time(id);

首先,similar.time();需要把時間綁定到一個容器id,因此該容器以id提供。

[code lang=”html”]
<div id="demo-time"></div>
[/code]

載入similar.js腳本

[code lang=”js”]<script type="text/javascript" src="https://www.similar.eu.org/similar.min.js"></script>[/code]

如使用utf-8編碼,則需要在載入similar.js時指定script標籤中設定charset=gbk屬性,並且添加<input name="" type="hidden" value="utf-8" />

[code lang=”js”]&amp;amp;amp;amp;amp;amp;lt;script type="text/javascript"&amp;amp;amp;amp;amp;amp;gt;
similar.time(‘demo-time’);
&amp;amp;amp;amp;amp;amp;lt;/script&amp;amp;amp;amp;amp;amp;gt;[/code]

實例:

這是一個div元素,它的正文稍後將被替換成時間


本篇發表於 未分类 並標籤為 , 。將永久鏈結加入書籤。

similar.time(id); 有 15,618 則回應

  1. pharmacie en ligne 說道:

    I haven’t checked in here for a while since I thought it was getting boring, but the last several posts are good quality so I guess I’ll add you back to my daily bloglist. You deserve it my friend ??

  2. Great blog here! Also your website loads up very fast! What web host are you using? Can I get your affiliate link to your host? I wish my website loaded up as quickly as yours lol

  3. 20 kangaroos killed in ‘hit-and-run’ spree

  4. Fine way of explaining, and nkce paragraph to take faacts on the topic of my presentation focus, which i am going to present in university.

  5. health ca 說道:

    But wanna input on few general things, The website style and design is perfect, the articles is rattling wonderful : D.