04JS高级动态添加属性和删除属性
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title></title> <script type ="text/javascript"> var obj = new Object(); obj.name = "张三"; //添加属性 alert(obj.name); delete obj.name; //删除属性 </script> </head> <body> </body> </html>