JSON.stringify 傷城~ 2022-05-27 11:52 88阅读 0赞 [JSON.stringify()和JSON.parse()分别是什么][JSON.stringify_JSON.parse] var login_name=$("#login_name").val(); var password=$("#password").val(); var json={}; json.loginname=login_name; json.password=password; console.log(json); var str=JSON.stringify(json); console.log(str); var str1='{"loginname":"sa","password":"123"}'; console.log(JSON.parse(str1)); 输出: ![20180418105932572][] [JSON.stringify_JSON.parse]: https://www.cnblogs.com/sexintercourse/p/6407801.html [20180418105932572]: /images/20220527/3aba8d69e61445c599a31ab98efb0789.png
还没有评论,来说两句吧...