<html lang="en">
<head>
<meta charset="UTF-8">
<title>Titletitle>
<script type="text/javascript">
//编写 一个JavaScript对象,
var user = {
name: "asdas",
age: 3,
sex: "男"
};
var json = JSON.stringify(user);
console.log(user);
//将js对象转化为json对象
console.log(json);
script>
head>
<body>
body>
html>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)