利用HTML屬性定義Ajax支持:intercooler.js

jopen 10年前發布 | 16K 次閱讀 JavaScript開發 intercooler.js

這是一個很小的JS庫,讓你能夠使用簡單,聲明式HTML屬性來為你的Web應用添加AJAX支持。

  <-- This button posts to the /example/click
         URL when it is clicked -->
  <button ic-post-to="/example/click">
    Click Me!
  </button>

<-- This span is bound to a URL that returns an updated version of the span when the button is clicked --> <span ic-src="/example/click"> You have not yet clicked the button </span></pre>

項目主頁:http://www.baiduhome.net/lib/view/home/1398953016359

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!