天天看點

JQuery模闆插件jquery.tmpl-動态ajax擴充

參數說明: Tmpl: function(template, data, fun) 1:template: 1): url: 為ajax的加載url,ajax當且僅當remote= true時候加載。 2):data: 為ajax加載參數 3) templateSelector: 為本地模闆選擇器,當且僅當remote= false時使用 4) remote: true為ajax,false為本地資料, 5) cache: 訓示是否對模闆緩存。 2:data: 3) templateData: 為本地資料,當且僅當remote= false時使用 3:fun為回調函數: fun(jquery.tmpl對象,模闆script,資料); 具體代碼如下: View Code 測試代碼: 前台: 背景ajax資料: 效果如上一篇: <a href="http://images.cnblogs.com/cnblogs_com/whitewolf/201111/201111092015037787.jpg"></a>

<a href="http://files.cnblogs.com/whitewolf/Demo.rar">demo下載下傳</a>

其他資料:我jQuery系列之目錄彙總

本文轉自破狼部落格園部落格,原文連結:http://www.cnblogs.com/whitewolf/archive/2011/11/09/2243571.html,如需轉載請自行聯系原作者

繼續閱讀