我有一個單獨的樣式表來打印。我想創建一個按鈕,只打開當前頁面,只執行樣式表並忽略其餘部分。如果這有助於我們在AngularJS中做到這一點。如何僅在打印樣式表的新選項卡中打開當前頁面?
這是樣式錶鏈接:
<link rel="stylesheet" href="css/printer-friendly.css" media="print">
我試圖通過更改默認的CSS此頁:
<script>
function changeStyle(themeName){
document.getElementById("basestyle").href= themeName+ ".css";
}
</script
的問題是樣式表的那其餘的干擾。
http://stackoverflow.com/questions/2531286/how-to-use-javascript-to -popup -a-new-window-with-almost-the-same-html-as-its-par – tahdhaze09 2013-05-13 20:47:24