1
我有一個保存在this fiddle中的javascript腳本。但我無法從硬拷貝中刪除打印按鈕。是否有其他方法可以刪除打印按鈕?下面的腳本給出:硬拷貝中的打印按鈕
function printpage()
{
var data = 'Sample Report<br />Sample Report<br />Sample Report<br />';
var data = data+'<br/><button onclick="window.print()" class="noprint">Print the Report</button>';
myWindow=window.open('','','width=800,height=600');
myWindow.innerWidth = screen.width;
myWindow.innerHeight = screen.height;
myWindow.screenX = 0;
myWindow.screenY = 0;
myWindow.document.write(data);
myWindow.focus();
}
和HTML是
<input type="button" value="Print Preview" onclick="printpage()" />
這正是我需要的。謝謝..! – mpsbhat
謝謝,所以我也很高興它幫助;-) – Stano