如何在使用javascript调用window.print()来执行打印页面的时候,在页脚显示页码
我想打印当前页,当前页是个Datagrid的报表,它有很多页,所以,我想在打印的每一页的页脚打印出页码,比如当前是第2页,共5页的话,我希望打印出 2/5 ,不知道应该怎么样实现。谢谢!
dim hkey_root,hkey_path,hkey_key
hkey_root="HKEY_CURRENT_USER"
hkey_path="\Software\Microsoft\Internet Explorer\PageSetup"
'//設置網頁打印的頁眉頁腳為空
function pageSetup_null()
on error resume next
Set RegWsh = CreateObject("WScript.Shell")
hkey_key="\header"
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,""
hkey_key="\footer"
'RegWsh.RegWrite hkey_root+hkey_path+hkey_key,""
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"&b第 &p 頁,共 &P 頁"
end function