{ Width: iWidth, Height: iHeight }
一个对象实例,具有 Width 和 Height 属性,
相应的属性值是 iWidth 和 iHeight。

解决方案 »

  1.   

    写个小例子
    L@_@K
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
      <title> new document </title>
      <meta name="generator" content="editplus" />
      <meta name="author" content="" />
      <meta name="keywords" content="" />
      <meta name="description" content="" />
     </head> <body>
      <script type="text/javascript">
      <!--
    function getObj()
    {
    var iWidth = 15;
    var iHeight = 30;
    return {Width:iWidth, Height:iHeight};
    };var obj = getObj();
    for (var p in obj)
    {
    alert(p+": "+obj[p]);
    }
      //-->
      </script>
     </body>
    </html>