联通开通国际短信:javascript 如果实现根据屏幕分辨率 控制表格的宽度

来源:百度文库 编辑:神马品牌网 时间:2024/05/04 05:20:24
<script language="javascript">
<!--
if(screen.width == "800")
{
document.all("mytable").style="width:60px";

}
else if (screen.width == "1024")
{
document.all("mytable").style="width:60px";

}
else
{
document.all("mytable").style="width:60px";
}
//-->
</script>
<table border="2" cellspacing="0" cellpadding="0" id="mytable"> >
<tr
<td> </td>
</tr>
</table>
这是错误的...........

应该怎么做.........