问题
Possible Duplicates:
How to make in Javascript full screen windows (stretching all over the screen)
Simulate JavaScript Key Events
I want to simulate F11 by the user pressing a button using javascript only, is this possible? I know its possible with a flash page. Thanks in advance.
回答1:
I doubt that there is any officially supported way because browsers are such a popular attack-vector, faking user keypresses would be an effective way to do bad things (vis click-fraud). That said, this question has some suggestions for simulating keypresses.
来源:https://stackoverflow.com/questions/6427690/full-screen-page-by-pressing-button-instead-of-f11