通过javascript更改ie页面设置
August 25th, 2008
No comments
<script language=”javascript”>
function PageSetup(key,value)
{
try{
var RegWsh = new ActiveXObject(“WScript.Shell”)
RegWsh.RegWrite(key,value)
}catch(e){}
}
//设置页头
PageSetup(“HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\PageSetup\\header”,”&w&b页码,&p/&P”);
PageSetup(“HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\PageSetup\\margin_left”,”0″);
PageSetup(“HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\PageSetup\\margin_right”,”0″);
PageSetup(“HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\PageSetup\\margin_top”,”0″);
PageSetup(“HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\PageSetup\\margin_bottom”,”0″);
</script>
最新评论