<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          PathJS輕量級 Web 瀏覽器路由

          聯(lián)合創(chuàng)作 · 2023-09-22 09:04

          PathJS 是個輕量級的,客戶端路由庫,允許你創(chuàng)建 “單頁”應用,使用 Hashbangs 和/或者 HTML5 pushState。

          主要特性:

          • 輕量級

          • 支持 HTML5 History API, 'onhashchange' 方法和平滑的 degredation

          • 支持根路由,rescue methods, paramaterized routes, optional route components (dynamic routes), and Aspect Oriented Programming

          • 經(jīng)過了很好的測試 (測試示例請看  ./tests 目錄)

          • 兼容所有主流瀏覽器(通過了 Firefox 3.6, Firefox 4.0, Firefox 5.0, Chrome 9, Opera 11, IE7, IE8, IE9 的測試)

          • 獨立于所有第三方庫,但是又能很好的與第三方庫結合使用

          簡單示例:

          function clearPanel(){
              // You can put some code in here to do fancy DOM transitions, such as fade-out or slide-in.
          }
          
          Path.map("#/users").to(function(){
              alert("Users!");
          });
          
          Path.map("#/comments").to(function(){
              alert("Comments!");
          }).enter(clearPanel);
          
          Path.map("#/posts").to(function(){
              alert("Posts!");
          }).enter(clearPanel);
          
          Path.root("#/posts");
          
          Path.listen();


          瀏覽 10
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  操逼三级片| 欧美性爱一区二区三区 | 美艳麻麻诱子乱小说 | 日本亚洲免费在线视频 | 99re免费|