<input type=button id=cc onclick='test()'>
<script>
function test()
{
  if(1024==screen.width)
  window.showModalDialog('about:对话窗口',"testwindow","dialogHeight:768px;dialogWidth:1024px;");
  else if(800==screen.width)
  window.showModalDialog('about:对话窗口',"testwindow","dialogHeight:600px;dialogWidth:800px;");
}
</script>