<script>
var xx=screen.width;
switch xx{
case "800":{
document.all.tableId.background="url";
break;
}
..............
}
</script>
var xx=screen.width;
switch xx{
case "800":{
document.all.tableId.background="url";
break;
}
..............
}
</script>
解决方案 »
- 触发mousedown的时候不触发click应该怎么写。
- 火狐中的非点击事件下的event.screenX
- 一个JS表单取值的问题,新手困扰多时!
- 怎样判断一个元素是否存在?
- css position: relative 定位问题
- 如何用javascript改变元素的从属关系?
- 为什么我的首页每次进入的时候,都需要刷新一下才能看到更新过的内容?
- 关于日期判断并自动锁定帖子的问题
- DIV块的内容能否链接至一页面中,用途是根据用户点击某按钮时,动态调用相关页面在DIV中显示,不想使用IFRAME控件。
- 如何使提交按钮点击后变为不可用状态?
- <body designMode="On">test</body>在页面打开时出错,提示“这个窗口已被注册成拖放目标”
- 如何通过javascript给table添加rowspan=3或colspan=3的表格?
<script>
if((screen.width==800)&&(screen.height==600))
document.all.mytable.style.background="yellow";
else
document.all.mytable.style.background="blue";
</script>
window.screen.height
var xx=screen.width;
switch (xx){
case "800":{
document.all.tableId.background="url";
break;
}
..............
}
</script>
加到正个页面最后,或定义成函数,在body onload中调用
<script>
var xx=screen.width;
switch (xx){
case 800:{
document.all.tableId.background="url";
break;
}
..............
}
</script>
<script>
if ((window.screen.width=="800")&&(screen.height=="600"))
document.all.top1.background ="http://localhost/CopHomepage/img/back_0d01.png";
else
document.all.top1.background ="img/back_0d01.png";
</script>