📄 899470.xml
字号:
<?xml version='1.0' encoding='GB2312'?>
<?xml-stylesheet type='text/xsl' href='../csdn.xsl'?>
<Topic>
<Issue>
<PostUserNickName>迷迷糊糊</PostUserNickName>
<rank>一级(初级)</rank>
<ranknum>user1</ranknum>
<credit>100</credit>
<TopicId>899470</TopicId>
<TopicName>在jsp中能否得到显示器的分辨率</TopicName>
<PostUserId>223978</PostUserId>
<PostUserName>ljing_lj</PostUserName>
<RoomName>JSP</RoomName>
<ReplyNum>5</ReplyNum>
<PostDateTime>2002-7-24 19:24:26</PostDateTime>
<Point>100</Point>
<ReadNum>0</ReadNum>
<RoomId>28</RoomId>
<EndState>2</EndState>
<Content>在jsp 程序中能否得到显示器的分辨率?不使用javascript或applet</Content>
</Issue>
<Replys>
<Reply>
<PostUserNickName>失去你是我今生最大的痛</PostUserNickName>
<rank>一星(中级)</rank>
<ranknum>star1</ranknum>
<credit>151</credit>
<ReplyID>5832181</ReplyID>
<TopicID>899470</TopicID>
<PostUserId>203548</PostUserId>
<PostUserName>realyfly</PostUserName>
<Point>15</Point>
<Content>用javascript传递参数给jsp就可以了</Content>
<PostDateTime>2002-7-24 19:36:51</PostDateTime>
</Reply>
<Reply>
<PostUserNickName>剑心</PostUserNickName>
<rank>五级(中级)</rank>
<ranknum>user5</ranknum>
<credit>100</credit>
<ReplyID>5832206</ReplyID>
<TopicID>899470</TopicID>
<PostUserId>161294</PostUserId>
<PostUserName>zhaoweiemail</PostUserName>
<Point>15</Point>
<Content>不能作到。
你可以通过javascript来取得。
屏幕分辨率
宽:screen.width
高:screen.height
如果在jsp中要用,可以在前一页取得,再传递到jsp中,这样就可以取得屏幕的分辨率了。</Content>
<PostDateTime>2002-7-24 19:38:23</PostDateTime>
</Reply>
<Reply>
<PostUserNickName>失去你是我今生最大的痛</PostUserNickName>
<rank>一星(中级)</rank>
<ranknum>star1</ranknum>
<credit>151</credit>
<ReplyID>5832325</ReplyID>
<TopicID>899470</TopicID>
<PostUserId>203548</PostUserId>
<PostUserName>realyfly</PostUserName>
<Point>0</Point>
<Content><script>
var width;
var ht;
width=screen.width
ht=screen.height
url="aaa.jsp?width="+width+"&ht="+ht
self.href.url=ht
</script>
应该行了</Content>
<PostDateTime>2002-7-24 19:45:30</PostDateTime>
</Reply>
<Reply>
<PostUserNickName>一支兰</PostUserNickName>
<rank>一级(初级)</rank>
<ranknum>user1</ranknum>
<credit>100</credit>
<ReplyID>5837356</ReplyID>
<TopicID>899470</TopicID>
<PostUserId>176161</PostUserId>
<PostUserName>shen_x_c</PostUserName>
<Point>70</Point>
<Content>用java可以得到屏幕的宽度、高度,即屏幕分辨率。
把下列代码放入你的程序段中,即可。
代码如下:
import java.awt.*;
...
int width=0;
int weight=0;
width=Toolkit.getDefaultToolkit().getScreenSize().width;
height=Toolkit.getDefaultToolkit().getScreenSize().height;
这样,取得width,height的值就是屏幕的默认最大值,屏幕分辨率。
</Content>
<PostDateTime>2002-7-25 9:29:03</PostDateTime>
</Reply>
<Reply>
<PostUserNickName>迷迷糊糊</PostUserNickName>
<rank>一级(初级)</rank>
<ranknum>user1</ranknum>
<credit>100</credit>
<ReplyID>5837419</ReplyID>
<TopicID>899470</TopicID>
<PostUserId>223978</PostUserId>
<PostUserName>ljing_lj</PostUserName>
<Point>0</Point>
<Content>谢谢大家的帮助</Content>
<PostDateTime>2002-7-25 9:31:38</PostDateTime>
</Reply>
</Replys>
</Topic>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -