Flash loader 在開始取得檔案前, 先用 xxx?v=28172364656 的方式取得一個設定檔, 該設定檔帶的 v={microtime} 其時間單位為 load 檔時的時間郵戳, 以確保該設定檔每次都是 load 到最新的, 再將要取得的檔案列表放在該設定檔內, 每個檔案都用 yyy?v=123458 的方式做版本控制, 這樣應該可以讓 Flash loader 隨時都能取得最新的檔案
Showing posts with label HTML. Show all posts
Showing posts with label HTML. Show all posts
Tuesday, January 24, 2012
Monday, August 08, 2011
jQuery file upload plugin: AjaxFileUpload
We can use AjaxFileUpload make a file upload process.
Basic usage:function ajaxFileUpload() { $.ajaxFileUpload({ url:'upload.php', secureuri:false, fileElementId:'fileToUpload', data:{name:'logan', id:'id'}, success: function (data, status) { alert($(data).text()); } }); return false; }
Official Guide have more detail usage.
Sunday, June 06, 2010
針對 XHTML strict 的標準而改變的 HTML 撰寫習慣
img 的 border 改用 style 來寫, 所以我索性直接在共用的 css 檔內寫 img { border: 0; }
td, th 內的 width 也要用 style 來寫...
a 的 target 不能用, 那就用 onclick="this.target='_blank';"
雖然蠻彆扭的, 也覺得 XHTML 這樣訂也蠻怪的 =3=
不過用這樣的方式也 OK 啦, 反正也不會少塊肉
倒是瀏覽網頁的人不開 javascript 的情形下不會開新視窗就是了, 哈哈
另一種方式是把 a 設一個 class, 我是設 class="new_win", 再用 jQuery 下 $(document).ready(function(){ $('.new_win').attr('target','_blank'); });
input 元件一定要被 tag 包起來, 像是 div, p, td 之類的... (這也蠻莫名其妙的啦=3=)
Subscribe to:
Posts (Atom)