随笔 - 480  文章 - 0 评论 - 45 阅读 - 73万
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

07 2018 档案
MySQL 基本语法(1.表字段操作,2表记录管理 3.运算符管理4.SQL查询 5.约束6.索引
摘要:1、表字段的操作 1、语法:alter table 表名 执行动作; 2、添加字段(add) 1、添加到末尾 alter table 表名 add 字段名 数据类型; 2、添加到第一列 alter table 表名 add 字段名 数据类型 first; 3、添加到指定位置 ... 阅读全文
posted @ 2018-07-29 21:58 python我的最爱 阅读(325) 评论(0) 推荐(0) 编辑
基本SQL命令 (1.SQL命令使用规则/2.库管理/3.表管理/4.表记录管理/5.更改库,库的默认字符集/6.连接数据库的过程/7.数据类型)
摘要:1、SQL命令的使用规则 1、每条命令必须以 ; 结尾 2、SQL命令不区分字母大小写 3、使用 \c 终止SQL命令的执行 2、库的管理 1、库的基本操作 1、查看已有的库 show databases; 2、创建库(指定字符集,默认为latin1) create database 库名 defa 阅读全文
posted @ 2018-07-28 21:47 python我的最爱 阅读(264) 评论(0) 推荐(0) 编辑
ubuntu上安装 MySQL 启动/停止 连接MySQL
摘要:1、Ubuntu上安装MySQL服务 1、安装服务端 sudo apt-get install mysql-server 2、安装客户端 sudo apt-get install mysql-client 2、服务端启动 1、查看MySQL服务的状态 sudo /etc/init.d/mysql s 阅读全文
posted @ 2018-07-28 21:29 python我的最爱 阅读(157) 评论(0) 推荐(0) 编辑
$.ajax({})
摘要:在html中的书写 在views中 import json red = {‘status’:True, ‘error’:None, 'data':None} nid = request.GET.get('nid') #接收数据 return Httpresponse(json.dumps(red)) 阅读全文
posted @ 2018-07-24 21:57 python我的最爱 阅读(154) 评论(0) 推荐(0) 编辑
django多对多数据库建立 以及数据的传输 并进行增加 删除 修改
摘要:多对多数据库的建立 通过models.ManyToManyField 创立 Host 与 Application的连接 v1 = models.Application.object.all() v1.name for i in v1.r.all(): i.hostname 增加: obj = mod 阅读全文
posted @ 2018-07-24 21:33 python我的最爱 阅读(150) 评论(0) 推荐(0) 编辑
django一对一数据库建立和进行数据传输的3种方式all()(对象) values()(字典) values_list()(元组)
摘要:由Host绑定Business 通过 2.字典 3.元组 阅读全文
posted @ 2018-07-24 14:28 python我的最爱 阅读(303) 评论(0) 推荐(0) 编辑
连接数据库实现用户的登录验证
摘要:1. from app01 import models 导入数据库 2.u = request.POST.get('username') p = request.POST.get('password') 通过这两步获取用户输入的账号和密码 3.obj = models.UseInfo.object. 阅读全文
posted @ 2018-07-21 10:24 python我的最爱 阅读(764) 评论(0) 推荐(0) 编辑
对数据库的数据实现增删改查
摘要:from app01 import models def rom(request): # 增加 models.UserInfo.object.create(username='alex', password='123') #查找 obj = models.UserInfo.object.all() 阅读全文
posted @ 2018-07-20 17:26 python我的最爱 阅读(139) 评论(0) 推荐(0) 编辑
通过django创建数据库的方法
摘要:在models 文件中实现 阅读全文
posted @ 2018-07-20 16:48 python我的最爱 阅读(279) 评论(0) 推荐(0) 编辑
路由的分发include实现
摘要:在主程序里面的URL.py 中 在app01.url 阅读全文
posted @ 2018-07-20 16:31 python我的最爱 阅读(189) 评论(0) 推荐(0) 编辑
URL的名称设置
摘要:1. 对于login.html 此为跳转文件, 加入了参数nid,在views.py中进行关于request.POST.get()的文件中获取 对于url.py 对于 login.html 对于views.detail 对于detail.html 2. django 进行区分,直接将参数传递给vie 阅读全文
posted @ 2018-07-20 15:27 python我的最爱 阅读(303) 评论(0) 推荐(0) 编辑
对于字典类型的后台传输
摘要:字典类型的话,只需要在跳转的html进行更改即可 用循环有3种写法 传递字典的key <ul> {%for k in user_list.keys%} <li>{{k}}</li> {%endfor%} </ul> 传递字典的value <ul> {%for v in user_list.value 阅读全文
posted @ 2018-07-20 11:27 python我的最爱 阅读(259) 评论(0) 推荐(0) 编辑
views中class定义(类的写法)CBV
摘要:这是views文件中定义home函数 在urls文件中 添加 阅读全文
posted @ 2018-07-20 11:00 python我的最爱 阅读(450) 评论(0) 推荐(0) 编辑
django框架 input 文本框 单选框 多选框 上传文件 等数据传输后台的程序 request.getlist接收多个结果 obj.chunks 用于文件传输 enctype="multipart/form-data文件传输必备表头
摘要:在上一个博客中,我们学习了如果创建django,这里我们主要讲如何把数据传给后台 在url文件中, 从app01中导入views, 以及创建url(r'^login/', views.login) 接下来在app01.views中的login函数进行操作 简要说明: 当第一次进入views.logi 阅读全文
posted @ 2018-07-19 23:16 python我的最爱 阅读(457) 评论(0) 推荐(0) 编辑
创建django的8大步骤xxx.setAttribute('name', 'user'); 添加属性和值 xxx.attr('name') 查看属性的值 $(xxx).addClass 添加样式 $().after() 添加在标签后面
摘要:第一步.创建django 方法一:django-admin startproject 方法二: 直接在python上创建 第二步:创建工程名cmdb python manage.py startapp cmdb(文件名) 第三步:设置静态文件路径 project.settings.py 文件中 ur 阅读全文
posted @ 2018-07-17 18:52 python我的最爱 阅读(354) 评论(0) 推荐(0) 编辑
自己创建js文件
摘要:js文件的创建: 文件的调用: 创建文件的两种方式 1.$.extend({ }) 2. $.fn.extend({ }) 阅读全文
posted @ 2018-07-14 19:22 python我的最爱 阅读(966) 评论(0) 推荐(0) 编辑
<form> 表单提交 return 阻止内容为空事件
摘要:Title 阅读全文
posted @ 2018-07-14 19:06 python我的最爱 阅读(267) 评论(0) 推荐(0) 编辑
阻止后续事件的发生 onclick 双return 事件绑定(..$).click一个return
摘要:Title 走你1 走你2 阅读全文
posted @ 2018-07-14 18:26 python我的最爱 阅读(323) 评论(0) 推荐(0) 编辑
点赞功能实现 $(tag).css('属性', '样式')
摘要:1. 创建标签 document.createElement() 2.$(tag).css('属性', 样式) 赋予标签属性样式 3.设置定时器 改变位置 大小 等属性 阅读全文
posted @ 2018-07-14 17:45 python我的最爱 阅读(283) 评论(0) 推荐(0) 编辑
ul li的添加 删除 复制 clone()
摘要:语法总结 li=document.createElement('li') li.innerText = tag $('#i1').append(li) $(..).clone() 复制整个文本和Html格式 阅读全文
posted @ 2018-07-14 16:19 python我的最爱 阅读(199) 评论(0) 推荐(0) 编辑
横向文本框 index获取索引 和 eq 实现
摘要:Title 菜单一 菜单二 菜单三 内容一 内容二 内容三 阅读全文
posted @ 2018-07-14 16:00 python我的最爱 阅读(222) 评论(0) 推荐(0) 编辑
横向文本框 cursor:pointer 出现手型
摘要:Title 菜单一 菜单二 菜单三 内容一 内容二 内容三 阅读全文
posted @ 2018-07-14 15:25 python我的最爱 阅读(243) 评论(0) 推荐(0) 编辑
开关 toggleClass('hide')
摘要:toggleClass 实现属性的反转 阅读全文
posted @ 2018-07-14 14:51 python我的最爱 阅读(195) 评论(0) 推荐(0) 编辑
文本操作 $(..).text() $(..).html() $(..).val()最后一种主要用于input
摘要:文本操作: $(..).text() # 获取文本内容 $(..).text('1') # 设置文本内容 $(..).html() $(..).html('1') $(..).val() $(..).val(..) Title 123 阅读全文
posted @ 2018-07-14 14:45 python我的最爱 阅读(423) 评论(0) 推荐(0) 编辑
表单的编辑添加和删除 .removeClass() .append() .preAll() .attr('b') document.createElement()
摘要:1.$(..).removeClass() 去除属性 2$(..).append 把内容加在后面 3.$(..).preAll() 前面所有的兄弟属性 4.$(..).attr('b') 属性b对应的数值 5.document.createElement() 创建标签 阅读全文
posted @ 2018-07-14 14:32 python我的最爱 阅读(387) 评论(0) 推荐(0) 编辑
菜单与内容下拉jQuery
摘要:Title 菜单1 内容 菜单2 内容 菜单3 内容 阅读全文
posted @ 2018-07-13 22:49 python我的最爱 阅读(147) 评论(0) 推荐(0) 编辑
s2选择框的全选和反选jQuery
摘要:Title 选择 ip post 1.1.1.1 80 ... 阅读全文
posted @ 2018-07-13 22:47 python我的最爱 阅读(165) 评论(0) 推荐(0) 编辑
作用域
摘要:2.函数的作用域在函数未被调用之前,已经创建 阅读全文
posted @ 2018-07-11 21:32 python我的最爱 阅读(138) 评论(0) 推荐(0) 编辑
当前触发事件的两种方式(onclick) 和 ('id') 获取
摘要:1. <input type='text' onclick = 'Clickon(this)'> <script> function Clickon(num){ num.style.backgroud = 'red' } </script> 2. <input type='text' id='i1' 阅读全文
posted @ 2018-07-11 21:15 python我的最爱 阅读(7124) 评论(0) 推荐(0) 编辑
词义分析
摘要:Title 阅读全文
posted @ 2018-07-11 21:09 python我的最爱 阅读(276) 评论(0) 推荐(0) 编辑
一次点击两次触发addEventListener
摘要:Title asdad 阅读全文
posted @ 2018-07-11 20:58 python我的最爱 阅读(544) 评论(0) 推荐(0) 编辑
html 1.0 鼠标放上去会亮 onmouseover onmouseout 以及this标签的使用
摘要:Title 123 123 123 阅读全文
posted @ 2018-07-11 20:31 python我的最爱 阅读(267) 评论(0) 推荐(0) 编辑
提示框一段时间以后消失setTimeout
摘要:Title 阅读全文
posted @ 2018-07-11 20:14 python我的最爱 阅读(218) 评论(0) 推荐(0) 编辑
两种定时器 setInterval(一直执行) setTimeout(只执行一次)
摘要://第一种 var obj = setInterval(function () { console.log(123); clearInterval(obj) }, 1000); //第二种 var text = setTimeout(function () { ... 阅读全文
posted @ 2018-07-11 19:24 python我的最爱 阅读(7477) 评论(0) 推荐(0) 编辑
其他标签a实现提交功能
摘要:Title 提交吧 阅读全文
posted @ 2018-07-11 19:17 python我的最爱 阅读(139) 评论(0) 推荐(0) 编辑
创建标签的两种方法insertAdjacentHTML 和 createElement 创建标签 setAttribute 赋予标签类型 appendChild 插入标签
摘要:1. 建立字符串和insertAdjacentHTML('beforeEnd', ) 2. 通过createElement 创建标签 setAttribute 赋予标签类型 appendChild 插入标签 阅读全文
posted @ 2018-07-11 19:08 python我的最爱 阅读(379) 评论(0) 推荐(0) 编辑
结构 样式 行为 相分离
摘要:Title 阅读全文
posted @ 2018-07-11 18:49 python我的最爱 阅读(154) 评论(0) 推荐(0) 编辑
搜索框请输入关键字 onfocus 和 onblur
摘要:Title 阅读全文
posted @ 2018-07-11 18:31 python我的最爱 阅读(308) 评论(0) 推荐(0) 编辑
后台布局
摘要:1. <link rel="stylesheet" href="../css/font-awesome.min.css"/> <div><i class="fa fa-envelope-o " aria-hidden="true"></i></div> //在awesome内提供标签名 2. bor 阅读全文
posted @ 2018-07-11 17:47 python我的最爱 阅读(157) 评论(0) 推荐(0) 编辑
CSS标签
摘要:1.position 位置的摆放形式 2.background 背景 background-image background-repeat background-position 3.text-align 文字位置 4.margin 外边距 5.padding 内边距 6.font-size 字体大 阅读全文
posted @ 2018-07-11 17:38 python我的最爱 阅读(91) 评论(0) 推荐(0) 编辑
下拉菜单的实现classList.add() classList.remove() class属性的添加和删除
摘要:Title 菜单1 内容1 内容1 菜单2 内容2 ... 阅读全文
posted @ 2018-07-10 21:45 python我的最爱 阅读(989) 评论(0) 推荐(0) 编辑
for循环
摘要:第一种形式 a=[11, 22, 33] for(var item in a){ console.log(item)} 第二种形式 for( var i=0; i<a.length, i++){ console.log(i)} 举例说明 阅读全文
posted @ 2018-07-10 21:42 python我的最爱 阅读(198) 评论(0) 推荐(0) 编辑
html的基本数据类型(数字,字符串, 列表, 字典)
摘要:基本数据类型 1. 数字 a = 18 ; 2. 字符串 a = 'alex'a.chartAt(索引位置)a.substring(起始位置, 借宿位置)a.length 获取当前字符串长度a.trim 去除空白a.concat(123) 拼接a.indexof(8) 获得子序列的位置a.lastI 阅读全文
posted @ 2018-07-10 21:28 python我的最爱 阅读(910) 评论(0) 推荐(0) 编辑
定时器 setInterval(‘function()’, 2000)
摘要:Title 阅读全文
posted @ 2018-07-10 21:16 python我的最爱 阅读(295) 评论(0) 推荐(0) 编辑
parseInt 和 parseFloat 实现字符串转换为数字
摘要:age = '18' a = parseInt(age) b = parseFloat(age) 阅读全文
posted @ 2018-07-10 21:00 python我的最爱 阅读(688) 评论(0) 推荐(0) 编辑
javarscript在HTML中的调用方式 (直接调用 和文件调用)
摘要://文件调用 Title 阅读全文
posted @ 2018-07-10 20:54 python我的最爱 阅读(286) 评论(0) 推荐(0) 编辑
input文本框 放上图片img 通过padding relative和absolute 的实现
摘要:Title 阅读全文
posted @ 2018-07-10 20:47 python我的最爱 阅读(323) 评论(0) 推荐(0) 编辑
padding 扩大边距 margin-top 与页面顶部的距离 hover鼠标移动到上面出现背景色CSS
摘要:Title LOGO 全部 42区 段子 1024 a 阅读全文
posted @ 2018-07-10 20:41 python我的最爱 阅读(247) 评论(0) 推荐(0) 编辑
overflow: auto 图片自适应调整
摘要:Title 阅读全文
posted @ 2018-07-10 20:34 python我的最爱 阅读(241) 评论(0) 推荐(0) 编辑
z-index层级顺序 opacity透明度 display: none 模态框实现
摘要:Title sdada 阅读全文
posted @ 2018-07-10 20:33 python我的最爱 阅读(239) 评论(0) 推荐(0) 编辑
相对固定位置 relative absolute
摘要:Title 阅读全文
posted @ 2018-07-10 20:29 python我的最爱 阅读(167) 评论(0) 推荐(0) 编辑
返回顶部 fixed oncheck(点击按钮)
摘要:Title 返回顶部 阅读全文
posted @ 2018-07-10 20:24 python我的最爱 阅读(358) 评论(0) 推荐(0) 编辑
margin-top和padding-top
摘要:padding- top 在原有的基础上进一步的扩张 margin - top 在原有的位置上发生上下的平移 阅读全文
posted @ 2018-07-04 17:41 python我的最爱 阅读(280) 评论(0) 推荐(0) 编辑
行内标签与块级标签的转换
摘要:display : inline-block 块级标签转换为行内标签 display : block 行内标签转换为块级标签 阅读全文
posted @ 2018-07-04 17:34 python我的最爱 阅读(282) 评论(0) 推荐(0) 编辑
淘宝界面(后续将补充)
摘要:<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <style> .pg-header{ height: 38px; line-height: 38px; background-colo 阅读全文
posted @ 2018-07-04 17:08 python我的最爱 阅读(217) 评论(0) 推荐(0) 编辑
浮动float 摆放位置
摘要:Title 1 2 阅读全文
posted @ 2018-07-04 16:18 python我的最爱 阅读(218) 评论(0) 推荐(0) 编辑
边框(border)宽度样式颜色 和基本属性
摘要:border: 1px solid red (宽度 样式 颜色) height:高度 width:宽度 font-size: 字体大小 text-align: 内容水平位置‘ line-height : 内容上下位置 font-weight : 字体粗细 阅读全文
posted @ 2018-07-04 15:55 python我的最爱 阅读(1145) 评论(0) 推荐(0) 编辑
调用css文件,进行调色
摘要:Title 小米 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <link rel = stylesheet href="commons.css"> </head> <body> 阅读全文
posted @ 2018-07-04 15:38 python我的最爱 阅读(159) 评论(0) 推荐(0) 编辑
style css
摘要:Title 语文 用户名 用户名 数学 英语 <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <style> .c1[n=alex]{ width: 100px;height: 200 阅读全文
posted @ 2018-07-04 15:32 python我的最爱 阅读(167) 评论(0) 推荐(0) 编辑
内容方框 fieldset
摘要:Title 阅读全文
posted @ 2018-07-04 14:45 python我的最爱 阅读(265) 评论(0) 推荐(0) 编辑
表格(table)
摘要:Title 阅读全文
posted @ 2018-07-04 14:35 python我的最爱 阅读(1240) 评论(0) 推荐(0) 编辑
列表(ul ol dl)
摘要:Title 1 2 3 阅读全文
posted @ 2018-07-04 14:23 python我的最爱 阅读(278) 评论(0) 推荐(0) 编辑
a 超链接标签
摘要:Title 百度 第一章 第一章 第一章内容 第二章内容 <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title></head><body> <a href="http://www.baidu. 阅读全文
posted @ 2018-07-04 14:03 python我的最爱 阅读(140) 评论(0) 推荐(0) 编辑
select(下拉标签和textarea(文本框)
摘要:Title 北京 南京 天津 武汉 石家庄 太原 dsadasd <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <div> <select name 阅读全文
posted @ 2018-07-04 13:37 python我的最爱 阅读(398) 评论(0) 推荐(0) 编辑
input标签
摘要:Title 请选择性别 爱好 技能 上传文件 <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title></head><body> <form enctype="multipart/form-da 阅读全文
posted @ 2018-07-04 13:22 python我的最爱 阅读(120) 评论(0) 推荐(0) 编辑
input 标签
摘要:Title 阅读全文
posted @ 2018-07-04 13:08 python我的最爱 阅读(144) 评论(0) 推荐(0) 编辑
div 标签
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <div> <div id="i1" style="position: fixed;right: 0; 阅读全文
posted @ 2018-07-04 13:06 python我的最爱 阅读(163) 评论(0) 推荐(0) 编辑
body 标签
摘要:-图标 &nbsp(空格) -&gt(>) &lt(<) -p标签, 段落 <br \> 做换行 所有的标签分为: 块级标签: div(白板), H系列(加大加粗), P标签(段落和段落之间有间隔) 行内标签:span标签(白板) 1. input标签 2.h 系列 用于放大和缩小 3.div 块级 阅读全文
posted @ 2018-07-04 13:02 python我的最爱 阅读(135) 评论(0) 推荐(0) 编辑
head 标签
摘要:1.<meta - > <meta charset="UTF-8"> #utf-8字符编码 <meta http-equiv="Refresh" content="3;Url=http://www.autohome.com.cn"> # 3秒后跳转 <meta name='keywords' con 阅读全文
posted @ 2018-07-04 12:23 python我的最爱 阅读(140) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示