<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="jquery-1.12.4.min.js" type="text/javascript"></script>
<script type="text/javascript">
var i = 0;
var SPDB = {
AddSPCDT : {
AddLeft : "",
AddToop : "",
AddX : "",
AddY : ""
},
AddSPCDT2 :[]
};
function Add () {
i= i+1;
var AddSPCDT = {
AddLeft : i,
AddToop : i,
AddX : i,
AddY : i};
SPDB.AddSPCDT2.push(AddSPCDT);
console.log(SPDB);
}
</script>
</head>
<body>
<div id="Add" οnclick="Add();" >点我</div>
</body>
</html>