开发者

How can I send the key ENTER to the page setup dialog in IE7

开发者 https://www.devze.com 2023-03-24 07:07 出处:网络
I have the following code that changes the page orientation. it works in IE6 but not in IE7. it gets as far as %a and does not send the enter or tab keys so that i can hit \'OK\'

I have the following code that changes the page orientation. it works in IE6 but not in IE7. it gets as far as %a and does not send the enter or tab keys so that i can hit 'OK'

var shell;
function SetPrintProperties() {

shell = new ActiveXObject("WScript.Shell");
shell.SendKeys("%fu"); // %=alt  f= file u= page setup
window.setTimeout("javascript:SetPaperSize();", 1500);

}

function SetPaperSize() {

shell.sendKeys("%a{ENTE开发者_StackOverflowR}");

}


Try to run this

shell.SendKeys("%~");

From here

0

精彩评论

暂无评论...
验证码 换一张
取 消