我需要最大化我的弹出窗口加载尝试下面的代码,但不起作用,我使用的是IE11浏览器。
pDateEdt.setOnClickListener(this);
答案 0 :(得分:1)
这对我有用,应该适合你,请尝试:
<!DOCTYPE html>
<html>
<body>
<p>Open a new window</p>
<button onclick="openWin()">Create window</button>
<script>
var myWindow;
function openWin() {
var x = screen.width;
var y = screen.height;
myWindow = window.open("https://stackoverflow.com/", "mywindow", "width="+x+",height="+y+",fullscreen=yes");
myWindow.moveTo(0, 0);
}
</script>
</body>
</html>
答案 1 :(得分:0)
我在代码
下使用此演示myWindow=window.open('','','width=100%,height=100%');
myWindow.document.write("This is 'myWindow'");
myWindow.moveTo(0,0);
myWindow.resizeTo(screen.width, screen.height);
答案 2 :(得分:0)
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script>
function maximize() {
//Your logic here
}
$(document).ready(function(){
maximize();
});
</script>
这是为了在文档加载时触发方法,对于逻辑实现部分,我建议你读一下: https://stackoverflow.com/a/7525760/6644368