javascript 不用控件如何控制页面打印的样式(左右边距等)! 主要是改变注册表里的HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup里的 margin_bottom、margin_top、margin_left、margin_right的几个值就可以改动页面的四个边距 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script language="VBScript">pbottom= '下边距ptop= '上边距pleft= '左边距pright= '右边距Set RegWsh = CreateObject("WScript.Shell")hkey_key="\margin_bottom"RegWsh.RegWrite hkey_root+hkey_path+hkey_key,pbottomhkey_key="\margin_top"RegWsh.RegWrite hkey_root+hkey_path+hkey_key,ptophkey_key="\margin_left"RegWsh.RegWrite hkey_root+hkey_path+hkey_key,plefthkey_key="\margin_right"RegWsh.RegWrite hkey_root+hkey_path+hkey_key,pright </script> 不好意思啊,漏了路径了<script language="VBScript">hkey_root="HKEY_CURRENT_USER"hkey_path="\Software\Microsoft\Internet Explorer\PageSetup"pbottom= '下边距ptop= '上边距pleft= '左边距pright= '右边距Set RegWsh = CreateObject("WScript.Shell")hkey_key="\margin_bottom"RegWsh.RegWrite hkey_root+hkey_path+hkey_key,pbottomhkey_key="\margin_top"RegWsh.RegWrite hkey_root+hkey_path+hkey_key,ptophkey_key="\margin_left"RegWsh.RegWrite hkey_root+hkey_path+hkey_key,plefthkey_key="\margin_right"RegWsh.RegWrite hkey_root+hkey_path+hkey_key,pright </script> 直接用css。@media print {body {font-size:9pt; margin:10px 20px 30px 40px } } 感觉还是css可行, 想别人开ie就提示有修改注册表,很让人反感为病毒,呵, rising的功能.. 在js中用document.execCommand("print")实现了jsp的打印,请问如何在js中设置默认横版打印 如何从字符串的第一个字母开始匹配? 简单获取元素问题 html中怎么调用模板 请问如何在一个form用一个SUBMIT(或button)分别提交到两个处理表单页面? 层的拖动问题 如何用JS设置COOKIE集合? 如何关闭未定义的窗口?????? 200分给你!duoduobaba(避雷针)进来! 怎样控制form 多选框check,必须经过选择才能提交? javascrip怎么获得网址中的参数? 帮忙改进成动态菜单效果,谢谢
pbottom= '下边距
ptop= '上边距
pleft= '左边距
pright= '右边距
Set RegWsh = CreateObject("WScript.Shell")
hkey_key="\margin_bottom"
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,pbottom
hkey_key="\margin_top"
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,ptop
hkey_key="\margin_left"
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,pleft
hkey_key="\margin_right"
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,pright
</script>
<script language="VBScript">
hkey_root="HKEY_CURRENT_USER"
hkey_path="\Software\Microsoft\Internet Explorer\PageSetup"
pbottom= '下边距
ptop= '上边距
pleft= '左边距
pright= '右边距
Set RegWsh = CreateObject("WScript.Shell")
hkey_key="\margin_bottom"
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,pbottom
hkey_key="\margin_top"
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,ptop
hkey_key="\margin_left"
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,pleft
hkey_key="\margin_right"
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,pright
</script>
body {font-size:9pt; margin:10px 20px 30px 40px }
}