摘要: 1. json的介绍 json是 JavaScript Object Notation 的首字母缩写,翻译过来就是javascript对象表示法,这里说的json就是类似于javascript对象的字符串,它同时是一种数据格式,目前这种数据格式比较流行,逐渐替换掉了传统的xml数据格式。 2. js 阅读全文
posted @ 2019-11-14 13:53 只会玩打野 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 想要在flask中直接用request.json来接收json数据 必须指定 contentType: "application/json", $.ajax({ url:'/n', type:'POST', contentType: "application/json", data:'{"name" 阅读全文
posted @ 2019-11-14 13:52 只会玩打野 阅读(107) 评论(0) 推荐(0) 编辑
摘要: jQuery是对JavaScript的封装,它是免费、开源的JavaScript函数库,jQuery 极大地简化了 JavaScript 编程。 入口函数 <script src="js/jquery-1.12.4.min.js"></script> <script> //原生js写法 window 阅读全文
posted @ 2019-11-14 13:49 只会玩打野 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 不能在导入js文件的标签里写代码 代码不会运行 1. 行内式(主要用于事件) <input type="button" name="" onclick="alert('ok!');"> 2. 内嵌式 <script type="text/javascript"> alert('ok!'); </sc 阅读全文
posted @ 2019-11-14 13:37 只会玩打野 阅读(129) 评论(0) 推荐(0) 编辑