js實現瀏覽器的各種菜單命令

在用ASP進行項目開始和網頁設計與製作當中,我們經常會碰到要把自己製作的增加一些瀏覽器的菜單命令,這裏我整理出來一些比較經常使用的命令的代碼,希望有機會和大家一起討論和分享...如果有不對之處還請各位批評指正...
js 代碼
  1. input type="button" οnclick="document.execCommand('open')" value=打開  
  2. input type="button" οnclick="document.execCommand('saveas')" value=保存  
  3. input type="button" οnclick="document.execCommand('print')" value=打印   
  4. input type="button" οnclick="document.execCommand('selectall')" value=全選   
  5. input type="button" οnclick="location.replace('view-source:'+location)" value=源文件   
  6. input type="button" οnclick="window.external.ShowBrowserUI('PrivacySettings',null)" value=安全選項   
  7. input type="button" οnclick="window.external.ShowBrowserUI('LanguageDialog', null)" value=語言設置  
  8. input type="button" οnclick="window.external.AddFavorite(location.href, document.title)" value=加入收藏夾   
  9. input type="button" οnclick="window.external.ShowBrowserUI('OrganizeFavorites', null)" value=整理收藏夾      
  10. input type="button" value=刷新 name=refresh οnclick="window.location.reload()">   
  11. input type="button" value=導入收藏夾 οnclick=window.external.ImportExportFavorites(true,'');   
  12. input type="button" value=導出收藏夾 οnclick=window.external.ImportExportFavorites(false,'');  
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章