列出对像属性,for(var i in obj)
摘要:
function listProperties(obj, objName) { var result = ""; for (var i in obj) { result += objName + "." + i + "=" + obj[i] + "\n"; } alert(result);} /*库中有个MC*/var mc:MC;var arr:Array = new Array ;for (var i:int=0; i<10; i++){ mc = new MC ; mc.x = 100; mc.y = 阅读全文