var obj = {
name:'张三',
age : 13,
gender:'男'
} /*for(属性名 in 对象名){
*
* }*/
for(i in obj){
console.log(obj[i])
} // 图一
Object.getOwnPropertyNames(obj).length //获取对象长度
for(i in document){
console.log(document[i])
}
console.log(document.write)
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script type="text/javascript">
var obj = {
name:'张三',
age : 13,
gender:'男'
} /*for(属性名 in 对象名){
*
* }*/
for(i in obj){
console.log(obj[i])
}
/*for(i in document){
console.log(document[i])
}*/
//console.log(document.write)
</script>
</head>
<body>
</body>
</html>