前端

ajax中contentType为application/json的用法

ajax中contentType为application/json的用法

不使用contentType: "application/json",则data可以是对象 $.ajax({ url: url, type: "post", datType: "json", data: { id: use

Joe.Ye Joe.Ye 2023-02-23
0 0 0
JavaScript原生和jQuery的ajax用法

JavaScript原生和jQuery的ajax用法

Form数据的序列化: $('#submit').click(function() { $('#form').serialize(); //会根据input里面的name,把数据序列化成字符串。eg:name=Joe.Ye&age

Joe.Ye Joe.Ye 2023-02-23
0 0 0
jQuery表单的取值与赋值

jQuery表单的取值与赋值

textarea取值与赋值 取值 var content = $("#textarea_id").val(); 赋值 $("#textarea_id").val(content); label取值与赋值 取值 var content = $("#l

Joe.Ye Joe.Ye 2023-02-23
0 0 0
Node.js包管理工具yarn安装使用

Node.js包管理工具yarn安装使用

Npm是Node.js的包管理器,是全球最大的开源库生态系统。Yarn是Facebook最近发布的一款依赖包安装工具。Yarn是一个新的快速安全可信赖的可以替代NPM的依赖管理工具。 Yarn跟npm的作用差不多,缓存了每个下载过的包,所以再次使用时无需重复下载。 同时利用并行下载以最大化资源利用率

Joe.Ye Joe.Ye 2023-02-23
0 0 0
Nodejs crypto密码模块

Nodejs crypto密码模块

crypto安装 $ npm install crypto crypto使用 createHash 适用于md4,md5,sha1,sha2(sha224,sha384,sha256,sha512)等 let sha1 = crypto.createHash('sha1').u

Joe.Ye Joe.Ye 2023-02-23
0 0 0
Node.js 测试

Node.js 测试

安装与准备 $ npm init -y $ npm i mocha -g $ mkdir test $ mocha 在项目目录下安装: $ npm install mocha --save-dev "scripts": { "test": ".

Joe.Ye Joe.Ye 2023-02-23
0 0 1
Node.js 入门

Node.js 入门

管理安装在系统上的 Node.js $ nvm ls-remote(查看远程所有版本) $ nvm install v6.11.0(安装指定版本) $ nvm install --lts(安装最新LTS版本) $ nvm install node(安装最新版本) $ nvm ls(列出安装的Node

Joe.Ye Joe.Ye 2023-02-23
0 0 0
1 18 19 20