js實現(xiàn)瀏覽器的各種菜單命令比如打印、查看源文件等等
更新時間:2013年10月24日 09:51:11 作者:
瀏覽器的各種菜單命令比如打印、查看源文件、加入收藏等等,這些在js中時完全可以實現(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=安全選項
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實現(xiàn)類似jquery里animate動畫效果的方法
這篇文章主要介紹了js實現(xiàn)類似jquery里animate動畫效果的方法,實例分析了javascript模擬實現(xiàn)jQuery中animate動畫效果的技巧,具有一定參考借鑒價值,需要的朋友可以參考下2015-04-04JS實現(xiàn)textarea通過換行或者回車把多行數(shù)字分割成數(shù)組并且去掉數(shù)組中空的值
這篇文章主要介紹了JS實現(xiàn)textarea通過換行或者回車把多行數(shù)字分割成數(shù)組并且去掉數(shù)組中空的值的相關(guān)資料,需要的朋友可以參考下2018-10-10JavaScript實現(xiàn)一個前端會魔法的旋轉(zhuǎn)魔方相冊
星光不問趕路人,時光不誤有心人,牛牛最近學(xué)到了一個神奇的旋轉(zhuǎn)魔方,今天就來分享給大家吧,希望大家能喜歡2022-06-06