js基础---object对象

原文链接:https://www.mk2048.com/blog/blog.php?id=h0k0jbc01c1j&title=js%E5%9F%BA%E7%A1%80---object%E5%AF%B9%E8%B1%A1
//**********************************复杂JSON举例****************************************
			var Jsondata={dept:[{name:"张三",age:"19",phone:"1234567"},{name:"李四",age:"20",phone:"7654321"}]};
			console.log(Jsondata)
			
//********************************利用JSON值设置divCSS样式******************************
			var odiv=document.getElementById("box");
			var fff={width:"200px",height:"120px",background:"blue"}
			for(var j in fff){odiv.style[j]=fff[j]}

  


更多专业前端知识,请上【猿2048】www.mk2048.com
上一篇:css前端面试题总结


下一篇:layui如何使表头内容居中显示