1. 程式人生 > >html javascipt物件

html javascipt物件

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script type="text/javascript">
        /*底層都是Object物件*/
var array=[4,8,2,1,10];
        object=new Object(array);
        document.write(object
.toString()+"<br/>"); document.write(object.valueOf()); </script> </body> </html>