<html> <body> <script type="text/javascript"> var test=new Date() if (test.constructor==Array) {document.write("This is an Array")} if (test.constructor==Boolean) {document.write("This is a Boolean")} if (test.constructor==Date) {document.write("This is a Date")} if (test.constructor==String) {document.write("This is a String")} </script> </body> </html>
编辑上面的文字,按下“查看结果”,效果会显示在右边 Create by 软晨网(RuanChen.com)