标签:style color java 使用 io for ar cti
<html>
<head>
<script>
window.onload=function(){
var myobj = new Object();
myobj.color = ‘red‘;
myobj.name = ‘hsin‘;
myobj.nation = ‘taiwan‘;
var myarr = new Array(‘blue‘,‘joe‘,‘taiwan‘);
//使用for(var key in arr)的方式
var content=‘‘;
for(var key in myobj){
content += key+‘ : ‘+myobj[key]+‘<br />‘;
}
for(var key in myarr){
content += key+‘ : ‘+myarr[key]+‘<br />‘;
}
document.getElementById(‘content_box‘).innerHTML = content;
}
</script>
</head>
<body>
<div id="content_box">
</div>
</body>
</html>
标签:style color java 使用 io for ar cti
原文地址:http://my.oschina.net/guomingliang/blog/299496