摘要:
1.初始jQuery <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <script src = "lib/jquery-3.6.0.js"></script> </head> < 阅读全文
posted @ 2022-08-05 23:42
tuyin
阅读(35)
评论(0)
推荐(0)
摘要:
今天主要是学习了一下JavaScript的BOM对象,节点和表单的相关操作,具体如下 1.操作BOM对象 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body 阅读全文
posted @ 2022-08-05 23:36
tuyin
阅读(36)
评论(0)
推荐(0)
摘要:
今天主要是学习了JavaScript的一些基础语法,但是今天没有将语法展示的结果截图显示,如果想看效果,可以看一下上篇博客的一些基本操作,自行到浏览器打印看输出结果。今天主要是把学习的代码分享出来,把基本的语法吃透理解。 1.字符串 <!DOCTYPE html> <html lang="en"> 阅读全文
posted @ 2022-08-05 23:26
tuyin
阅读(35)
评论(0)
推荐(0)
摘要:
今天主要是JavaScript的入门学习,所以我把运行结果记录展示出来,主要是在浏览器的控制台里面查看结果,直接点进网页是没有显示的 1.我的第一个JavaScript程序 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> 阅读全文
posted @ 2022-08-05 23:04
tuyin
阅读(40)
评论(0)
推荐(0)
摘要:
默认情况 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> div{ margin: 10px; padding: 5px; font-size: 12px; lin 阅读全文
posted @ 2022-08-05 19:44
tuyin
阅读(39)
评论(0)
推荐(0)
摘要:
display代码 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <!-- block 块元素 inline 行内元素 inline-block 是块元素,但是可以内联,在一行! 阅读全文
posted @ 2022-08-05 19:30
tuyin
阅读(40)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> div{ width: 100px; height: 100px; border: 10px solid red; 阅读全文
posted @ 2022-08-05 19:25
tuyin
阅读(27)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> /* 主对角线和副对角线,顺时针方向 圆圈: 圆角 = 半径! */ div{ width: 100px; heig 阅读全文
posted @ 2022-08-05 19:18
tuyin
阅读(33)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> /*body总有一个默认的外边距margin: 0,常见操作*/ /* h1,ul,li,a,body{ margi 阅读全文
posted @ 2022-08-05 19:17
tuyin
阅读(24)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> div{ width: 800px; height: 600px; border: 1px solid red; b 阅读全文
posted @ 2022-08-05 19:15
tuyin
阅读(30)
评论(0)
推荐(0)
摘要:
index代码 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>列表样式</title> <link rel="stylesheet" href="css/style.css"type="text/css"> 阅读全文
posted @ 2022-08-05 19:09
tuyin
阅读(37)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> /*默认的颜色*/ a{ text-decoration: none; color: black; } /*鼠标悬浮 阅读全文
posted @ 2022-08-05 18:59
tuyin
阅读(34)
评论(0)
推荐(0)
摘要:
index代码 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <!-- 颜色:单词 RGB 0~F RGBA A: 字体透明度0~1 text-align: 排版,居中 text 阅读全文
posted @ 2022-08-05 18:44
tuyin
阅读(43)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <!-- font-family:字体类型 font-size:字体大小 font-weight:字体颜色 --> <style> 阅读全文
posted @ 2022-08-05 18:39
tuyin
阅读(54)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> #title{ font-size: 40px; } </style> </head> <body> 欢迎学习<sp 阅读全文
posted @ 2022-08-05 18:38
tuyin
阅读(16)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> .demo a{ float: left;/*往左边浮动*/ display: block; height: 50p 阅读全文
posted @ 2022-08-05 18:25
tuyin
阅读(87)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> /*ul的第一个子元素*/ ul li:first-child{ background: blue; } /*ul的 阅读全文
posted @ 2022-08-05 18:22
tuyin
阅读(29)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> /* p{ background: aqua; }*/ /*后代选择器(选择某个元素的后面)*/ /* body p 阅读全文
posted @ 2022-08-05 18:20
tuyin
阅读(22)
评论(0)
推荐(0)
摘要:
标签选择器 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> h1 { color: aqua; background: #3cbda6; border-radius 阅读全文
posted @ 2022-08-05 18:18
tuyin
阅读(36)
评论(0)
推荐(0)
摘要:
index代码 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <link rel="stylesheet" href="style.css"> <!--内部样式--> <styl 阅读全文
posted @ 2022-08-05 18:13
tuyin
阅读(33)
评论(0)
推荐(0)
摘要:
index代码 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <!--规范, <style>可以编写css的代码,每一个声明最好使用分号结尾 语法: 选择器{ 声明1; 声明2; 阅读全文
posted @ 2022-08-05 18:03
tuyin
阅读(52)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>登录注册</title> </head> <body> <h1>注册</h1> <!--表单form action:表单提交的位置,可以是网站,也可以是一个请求 阅读全文
posted @ 2022-08-05 17:56
tuyin
阅读(41)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>内联框架学习</title> </head> <body> <!--iframe内联框架 src:地址 w-h:宽度高度 --> <iframe src="" 阅读全文
posted @ 2022-08-05 17:50
tuyin
阅读(27)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>页面结构分析</title> </head> <body> <heard> <h2>网页头部</h2> </heard> <section> <h2>网页主体< 阅读全文
posted @ 2022-08-05 17:44
tuyin
阅读(40)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>媒体元素学习</title> </head> <body> <!--音频和视频 src:资源路径 controls:控制视频播放选项 autoplay:控制视频 阅读全文
posted @ 2022-08-05 17:43
tuyin
阅读(67)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>表格标签学习</title> </head> <body> <!--表格table 行 tr 列 td --> <table border="1px" > <t 阅读全文
posted @ 2022-08-05 17:31
tuyin
阅读(30)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>列表学习</title> </head> <body> <!--有序列表 应用范围:试卷,问答..... --> <ol> <li>Java</li> <li> 阅读全文
posted @ 2022-08-05 17:30
tuyin
阅读(27)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>链接标签学习</title> </head> <body> <!--使用name作为一个标记--> <a name="top">顶部</a> <!--a标签 h 阅读全文
posted @ 2022-08-05 17:28
tuyin
阅读(21)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>图像标签学习</title> </head> <body> <!--img学习 src:图片地址(必填) 相对地址,绝对地址 ../ --上一级目录(相对地址) 阅读全文
posted @ 2022-08-05 17:19
tuyin
阅读(28)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>基本标签学习</title> </head> <body> <!--标题标签--> <h1>一级标签</h1> <h2>二级标签</h2> <h3>三级标签</ 阅读全文
posted @ 2022-08-05 17:09
tuyin
阅读(34)
评论(0)
推荐(0)
摘要:
<!-- DOCTYPE:告诉浏览器,我们要使用什么规范--> <!DOCTYPE html> <html lang="en"> <!--快捷添加注释:①ctrl+ / 或者 ②shift+ctrl+ /--> <!--head标签代表网页头部--> <head> <!--meta描述性标签,用来描 阅读全文
posted @ 2022-08-05 17:04
tuyin
阅读(33)
评论(0)
推荐(0)
摘要:
import os filename = 'student.txt' def main(): while True: menum() choice = int(input("请选择对应数字:")) if choice in [0, 1, 2, 3, 4, 5, 6, 7]: if choice == 阅读全文
posted @ 2022-08-05 16:05
tuyin
阅读(105)
评论(0)
推荐(0)
摘要:
任务一: import time def show_info(): print('输入提示数字,执行相应的操作:0.退出 1.查看登录日志') # 记录日志 def write_logininfo(username): with open('log.txt', 'a')as file: s = f' 阅读全文
posted @ 2022-08-05 16:03
tuyin
阅读(74)
评论(0)
推荐(0)
摘要:
任务一: import prettytable as pt # 显示座席 def show_ticket(row_num): tb = pt.PrettyTable() tb.field_names = ['行号', '座位1 ', '座位2', '座位3', '座位4', '座位5'] for i 阅读全文
posted @ 2022-08-05 16:01
tuyin
阅读(54)
评论(0)
推荐(0)
摘要:
任务一: class Instrument(): def make_sound(self): pass class Erhu(Instrument): def make_sound(self): print('二胡在演奏') class Piano(Instrument): def make_sou 阅读全文
posted @ 2022-08-05 15:59
tuyin
阅读(45)
评论(0)
推荐(0)
摘要:
任务一: import math class Circle(object): def __init__(self, r): self.r = r def get_area(self): return math.pi*math.pow(self.r, 2) def get_perimeter(self 阅读全文
posted @ 2022-08-05 15:57
tuyin
阅读(51)
评论(0)
推荐(0)
摘要:
任务一: try: score = int(input('请输入你的分数:')) if 0 <= score <= 100: print('分数为:', score) else: raise Exception('分数不正确') except Exception as e: print(e) 任务二 阅读全文
posted @ 2022-08-05 15:55
tuyin
阅读(55)
评论(0)
推荐(0)
摘要:
任务一: def calc(a, b, op): if op == "+": return add(a, b) elif op == "-": return sub(a, b) elif op == '*': return mul(a, b) elif op == "/": if b!= 0: re 阅读全文
posted @ 2022-08-05 15:54
tuyin
阅读(48)
评论(0)
推荐(0)
摘要:
任务一: # 统计指定字符出现的次数 def get_count(s, ch): count = 0 for item in s: if ch.upper() == item or ch.lower() == item: count += 1 return count if __name__ == 阅读全文
posted @ 2022-08-05 15:52
tuyin
阅读(44)
评论(0)
推荐(0)
摘要:
任务一: coffee_name = ('蓝山', '卡布其尔', '拿铁', '皇家咖啡', '女五咖啡', '美丽与哀愁') print('您好!欢迎光临小(>^ω^<)喵咖啡屋') print('本店经营的咖啡有:') # index获取元组当中的元素索引,item获取元组当中的元素内容 fo 阅读全文
posted @ 2022-08-05 15:50
tuyin
阅读(57)
评论(0)
推荐(0)
摘要:
任务一: # 创建星座的列表 constellation = ['白羊座', '金牛座', '双子座', '巨蟹座', '狮子座', '处女座', '天秤座', '天蝎座', '射手座', '摩羯座', '水瓶座', '双鱼座'] # 创建性格列表 nature = ['积极乐观', '固执内向', 阅读全文
posted @ 2022-08-05 15:45
tuyin
阅读(53)
评论(0)
推荐(0)
摘要:
任务一: year = [83, 89, 83, 94, 85, 00, 98] print('原列表:', year) for index, value in enumerate(year): # print(index, value) if str(value) != '0': year[ind 阅读全文
posted @ 2022-08-05 15:43
tuyin
阅读(57)
评论(0)
推荐(0)
摘要:
任务一: # 代表了a的ASCII值 x = 97 for _ in range(1, 27): print(chr(x), '➝➝➝➝➝', x) x += 1 print(' ') x = 97 while x< 123: print(chr(x), '➝➝➝➝➝', x) x += 1 任务二 阅读全文
posted @ 2022-08-05 15:41
tuyin
阅读(48)
评论(0)
推荐(0)
摘要:
任务一: # 模拟支付密码的验证 pwd = input('支付宝支付密码:') if pwd.isdigit():# isdigit判断支付密码是否全部为数字 print('支付数据合法') else: print('支付数字不合法,支付密码只能是数据') print(' ') print('支付 阅读全文
posted @ 2022-08-05 15:37
tuyin
阅读(61)
评论(0)
推荐(0)
摘要:
任务一: def fun(): num = int(input("请输入一个十进制的整数:")) print(num, '的二进制数为:', bin(num)) # 第一种写法,使用了个数可变的位置参数 print(str(num)+"的二进制数为:"+bin(num)) # 第二种写法,使用“+” 阅读全文
posted @ 2022-08-05 15:33
tuyin
阅读(61)
评论(0)
推荐(0)
摘要:
任务一: book_name = 'Java程序设计程序' publish = '西安电子科技大学出版社' pub_date = "2019-02-02" price = 56.8 print('▶→→→→→→→→→→→→→→→→→→→◀') print('▷\t\t《', book_name, ' 阅读全文
posted @ 2022-08-05 13:36
tuyin
阅读(27)
评论(0)
推荐(0)
摘要:
任务一: # 一、①使用print方式进行输出(输出的目的地是文件) fp = open('D:/test.txt', 'w') print("奋斗成就更好的你", file=fp) fp.close() 任务二: # ②使用文件读写操作 with open('D:/test1.txt', 'w') 阅读全文
posted @ 2022-08-05 13:30
tuyin
阅读(96)
评论(0)
推荐(0)
摘要:
import math class Shape: def __init__(self, name, area, perimeter): self.name = name self.area = area self.perimeter = perimeter def cal_area(self): p 阅读全文
posted @ 2022-08-05 09:14
tuyin
阅读(854)
评论(0)
推荐(0)
摘要:
封装 class Turtle: head = 1 eyes = 2 leg = 4 shell = True def crawl(self): print("人们总抱怨我动作慢吞吞的,殊不知如不积跬步,无以至千里的道理。") def run(self): print("虽然我行动很慢,但如果遇到危 阅读全文
posted @ 2022-08-05 09:11
tuyin
阅读(36)
评论(0)
推荐(0)
摘要:
求一个数的阶乘 # 迭代方法实现 def factIter(n): result = n for i in range(1, n): result *= i return result print(factIter(10)) # 递归方法实现 def funC(n): if n == 1: retu 阅读全文
posted @ 2022-08-05 08:51
tuyin
阅读(29)
评论(0)
推荐(0)
摘要:
创建和调用函数 # I Love You # I Love You # I Love You def myfunc(): for i in range(3): print("I Love You") myfunc() 函数的参数 # I Love python # I Love python # I 阅读全文
posted @ 2022-08-05 08:48
tuyin
阅读(58)
评论(0)
推荐(0)
摘要:
创建集合 # 集合,无序 # 创建集合 # {'Love', 'Python'} print({"Love", "Python"}) # {'o', 'h', 't', 'n', 'P', 'y'} print({s for s in "Python"}) # {'o', 'h', 't', 'n' 阅读全文
posted @ 2022-08-05 00:07
tuyin
阅读(27)
评论(0)
推荐(0)
摘要:
x = {"卢布", "关羽"} print(type(x)) y = {"卢布":"小布布", "关羽":"小鱼鱼"} y["刘备"] = "小贝贝" print(y) print(y["卢布"]) 创建字典的方式 a = {'卢布': '小布布', '关羽': '小鱼鱼', '刘备': '小贝贝 阅读全文
posted @ 2022-08-05 00:05
tuyin
阅读(115)
评论(0)
推荐(0)
摘要:
sorted方法 t = ["FishC", "Apple", "Book", "Banana", "Pen"] # sorted方法只是比较首个字母的ASCALL值,如果第一个字母相同就比较第二个字母 # ['Apple', 'Banana', 'Book', 'FishC', 'Pen'] s 阅读全文
posted @ 2022-08-05 00:01
tuyin
阅读(42)
评论(0)
推荐(0)

浙公网安备 33010602011771号