<div class="codetitle"> <span><a style="CURSOR: pointer" data="58649" class="copybut" id="copybut58649" onclick="doCopy('code58649')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code58649"> <br>$(document).ready(function () { <br><br>var obj = {Name: 'Allen', Age: '30'}; <br>for (var o in obj) <br>{ <br>var a = console.log(o); // Name ,Age <br>var a = console.log(obj[o]); //Allen,30 <br>} <br>}); <br> <br> </div>