Posted on 2008-05-31 09:42
七郎归来 阅读(1230)
评论(0) 编辑 收藏
java
import java.awt.Toolkit;
import java.awt.Dimension;
public class ScreenRate
{
public static void main(String[] args)
{
Toolkit tl=Toolkit.getDefaultToolkit();
Dimension screenSize=tl.getScreenSize();
System.out.println("当前屏幕分辨率为"+(int)screenSize.getWidth()+"*"+(int)screenSize.getHeight());
}
}
js
alert(screen.height);
alert(screen.width);