<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<script type="text/javascript" src="jquery-1.11.2.min.js"></script>
<style type="text/css">
</style>
<script type="text/javascript">
$(function(){
var json1 = {"name":"naruto","age":"16","favorite":"lamian"};
var json2 = $.extend(true, {}, json1);
delete json1.age;
var html = [];
for(var temp in json2){
html.push(json2[temp]);
}
document.body.innerHTML = html;
});
$(function(){
var a = ['a','b','c'];
//var b = $.extend(true, [], a); //方式1
var b = a.slice(0); //方式2
a.splice(1,1);
var html = b.join(',');
//document.body.innerHTML = html + ", <br /> 数组a:"+ a.join(',');
});
</script>
</head>
<body>
</body>
</html>
相关链接:
http://www.cnblogs.com/Loofah/archive/2012/03/23/2413665.html
http://www.cnblogs.com/newsea/archive/2012/09/16/2687669.html