js實(shí)現(xiàn)瀏覽器的各種菜單命令比如打印、查看源文件等等
更新時(shí)間:2013年10月24日 09:51:11 作者:
瀏覽器的各種菜單命令比如打印、查看源文件、加入收藏等等,這些在js中時(shí)完全可以實(shí)現(xiàn)的,本文搜集整理了一些,感興趣的朋友可以參考下
復(fù)制代碼 代碼如下:
input type="button" onclick="document.execCommand('open')" value=打開
input type="button" onclick="document.execCommand('saveas')" value=保存
input type="button" onclick="document.execCommand('print')" value=打印
input type="button" onclick="document.execCommand('selectall')" value=全選
input type="button" onclick="location.replace('view-source:'+location)" value=源文件
input type="button" onclick="window.external.ShowBrowserUI('PrivacySettings',null)" value=安全選項(xiàng)
input type="button" onclick="window.external.ShowBrowserUI('LanguageDialog', null)" value=語言設(shè)置
input type="button" onclick="window.external.AddFavorite(location.href, document.title)" value=加入收藏夾
input type="button" onclick="window.external.ShowBrowserUI('OrganizeFavorites', null)" value=整理收藏夾
input type="button" value=刷新 name=refresh onclick="window.location.reload()">
input type="button" value=導(dǎo)入收藏夾 onclick=window.external.ImportExportFavorites(true,'');
input type="button" value=導(dǎo)出收藏夾 onclick=window.external.ImportExportFavorites(false,'');
相關(guān)文章
js實(shí)現(xiàn)類似jquery里animate動(dòng)畫效果的方法
這篇文章主要介紹了js實(shí)現(xiàn)類似jquery里animate動(dòng)畫效果的方法,實(shí)例分析了javascript模擬實(shí)現(xiàn)jQuery中animate動(dòng)畫效果的技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下2015-04-04基于javascript的無縫滾動(dòng)動(dòng)畫1
這篇文章主要介紹了基于javascript的無縫滾動(dòng)動(dòng)畫實(shí)現(xiàn),文章通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2020-08-08JS實(shí)現(xiàn)textarea通過換行或者回車把多行數(shù)字分割成數(shù)組并且去掉數(shù)組中空的值
這篇文章主要介紹了JS實(shí)現(xiàn)textarea通過換行或者回車把多行數(shù)字分割成數(shù)組并且去掉數(shù)組中空的值的相關(guān)資料,需要的朋友可以參考下2018-10-10詳解JavaScript前端如何有效處理本地存儲(chǔ)和緩存
前端本地存儲(chǔ)和緩存的處理是一種重要的技術(shù),它可以幫助改善應(yīng)用程序的性能和用戶體驗(yàn),下面是小編整理的一些處理前端本地存儲(chǔ)和緩存的常用方法,希望對(duì)大家有所幫助2023-11-11JavaScript實(shí)現(xiàn)一個(gè)前端會(huì)魔法的旋轉(zhuǎn)魔方相冊(cè)
星光不問趕路人,時(shí)光不誤有心人,牛牛最近學(xué)到了一個(gè)神奇的旋轉(zhuǎn)魔方,今天就來分享給大家吧,希望大家能喜歡2022-06-06