js里的关联数组对象

时间:2019-06-18 13:20:43   收藏:0   阅读:109
<html>
<head>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script>
$(function(){
 
var gupiao={
"IBM":40,
"HW":1000,
"ZH":100
}
for(var s in gupiao){
//通过关联数组的对象来动态获取属性值
console.log(gupiao[s]);
}
})
</script>
</head>
<body>
 
</body>
</html>

原文:https://www.cnblogs.com/kukai/p/11044557.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!