根据浏览器大小来显示不同内容
2014-01-22 15:03 池戎 阅读(154) 评论(0) 编辑 收藏 举报 <script>
if(screen.width=="800"&&screen.height=="600"){document.write("800*600");}
else if(screen.width=="1024"&&screen.height=="768"){document.write("1024*768");}
else{document.write(screen.width);}
</script>
if(screen.width=="800"&&screen.height=="600"){document.write("800*600");}
else if(screen.width=="1024"&&screen.height=="768"){document.write("1024*768");}
else{document.write(screen.width);}
</script>
如有疑问,请和我一起讨论。