0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

JAVA总结3

Posted at

1.HTML

⭐快捷键
①快速打出框架:!+回车
②注释:ctrl+shift+/
③保存:ctrl s
④打开浏览器:alt+b

标题排版

😊图片标签:img(src:url width:宽度 height:高度)
😊标题标签: h1 - h6
😊水平线标签:hr
image.png

2.CSS

①标题样式(CSS选择器)

CSS选择器:用来选取需要设置样式的元素(比如设置字体颜色、大小、背景色等)
image.png
image.png

②超链接(a标签)

href:指定访问的url target:指定在哪里打开资源链接
self:在当前页面打开 blank:在空白页面打开
⭐超链接CSS属性:
text-decoration:规定添加到文本的修饰
none:定义标准的文本

③页面布局

😊div:一行只显示一个。
😊span:一行可以显示多个
⭐CSS盒子模型及属性
image.png

3.JS

①变量

let:不能重复定义
const:常量,不能被改变的

②运算符

==:会进行类型转换 ===:不会进行类型转换

③JS函数(function)

image.png

④Array

😊数组长度可变,可以存储任意类型的数据 var 变量名 = [ 元素列表 ];
😊访问:arr[ 索引 ]= 值;
😊方法:
forEach:遍历数组中有值的元素(快捷键:输入fori后按下Tab键)
image.png
添加元素:push
删除元素(从哪个索引开始删,删几个元素):splice

⑤String

方法:
😊charAt:获取指定位置的字符
😊indexOf:检查字符串,返回索引值
😊trim:去除字符串左右两侧的空格
😊substring:提取字符串中两个指定的索引号之间的字符。开始索引,结束索引,含头不含尾

⑥DOM

image.png
image.png
innerHTML:更改内容
TagName:标签名
ByName:属性名
checked=true的话 选中复选框
toLowerCase:变成小写
toUpperCase:变成大写

⑦事件绑定

image.png

4.Vue(html,js,css的结合体,框架!)

①常用指令

通过v-bind或者v-model绑定的变量,必须在数据模型中声明
image.png

②生命周期

mounted:挂载完成(发送请求到服务端,加载数据)

5.Axios

①引入Axios的js文件
②使用Axios发送请求,并获取响应结果
image.png
image.png
image.png

6.注解

1-RequestMapping:后面添加路径
2-RequestBody:json参数
3-PathVariable:获取路径参数
4-SpringBootApplication:具有包扫面作用,默认扫描当前包及其子包

7.数据库操作

查询所有数据库:show databases;
查询当前数据库:select databases();
使用数据库:use 数据库名;
创建数据库:create databases if not exists 数据库名;
删除数据库:drop databases if exists 数据库名;

8.数据操作

①添加数据(insert)

image.png

②修改数据(update)

image.png

③删除数据(delete)

image.png

9.查询

①基本查询

image.png

②条件查询where

image.png
image.png

③分组查询group by

image.png
image.png

④排序查询order by

image.png
升序(默认):ASC
降序:DESC
image.png

⑤分页查询limit

image.png
起始索引= (页码-1)*每页展示的记录数
image.png

10.聚合函数

将一列数据作为一个整体,进行纵向计算
语法:select 聚合函数(字段列表) from 表名;
image.png
image.png

11.多表设计

一对多:在多的一方添加外键,关联另外一方的主键
一对一:任意一方,添加外键,关联另外一方的主键
多对多:通过中间表来维护,中间表的两个外键,分别关联另外两张表的主键

12.多表查询

image.png

①内连接

image.png
image.png

②外连接

image.png
image.png

13.事务

要么全部成功,要么全部失败
开始事务:start transaction; / begin;
提交事务:commit;
回滚事务:rollback;

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?