跳至內容
Sars' History
使用者工具
登入
網站工具
工具
顯示頁面
舊版
反向連結
最近更新
多媒體管理器
網站地圖
登入
最近更新
多媒體管理器
網站地圖
足跡:
webdesign:ux
本頁是唯讀的,您可以看到原始碼,但不能更動它。您如果覺得它不應被鎖上,請詢問管理員。
====== User Experience ====== ===== Tools ===== * [[http://pencil.evolus.vn/Stencils-Templates.html|Pencil]] ===== Misc ===== ==== 防止誤觸Backspace鍵跳離編輯中網頁 ==== http://blog.darkthread.net/post-2011-07-26-prevent-backspace-goback-in-browser.aspx <code> <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.2.js" type="text/javascript"></script> <script type="text/javascript"> $(function () { //除了input text外,停用Backsapce,防止不慎回前一頁 $(document).keydown(function (e) { //採用demo建議 多考量"textarea" if (e.which == 8 && (e.target.type == "text" || e.target.type == "textarea")) e.preventDefault(); }); }); </script> </code> <code> <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.2.js" type="text/javascript"></script> <script type="text/javascript"> $(function () { function setUnloadWarning(enabled) { window.onbeforeunload = enabled ? showWarning : null; } function showWarning() { return "資料尚未儲存,確定要離開嗎?" } $("input:text").live("change", function () { setUnloadWarning(true); }); $("input:submit").click(function () { setUnloadWarning(false); }); }); </script> </code>
webdesign/ux.1393378992.txt.gz
· 上一次變更: 2014/02/26 09:43 由
sars
頁面工具
顯示頁面
舊版
反向連結
回到頁頂