36jsbom,open和close对象
摘要:<head> <meta charset="UTF-8"> <title>3,open和close函数</title></head><body> <!--open作用 通常情况下与超链接效果相同, 但为了避免多次打开一个网页,就要给这个要打开的网页设置一个别名,也就是open的第二个参数 --> <
阅读全文
posted @
2022-04-11 16:39
小小程序猿level1
阅读(43)
推荐(0)
35jsbom,location
摘要:<div> <input type="button" onclick="jump('http://www.baidu.com')" value="百度"> <input type="button" onclick="jump('2.location.html?username=asde&passwo
阅读全文
posted @
2022-04-11 16:07
小小程序猿level1
阅读(23)
推荐(0)
34js,bom简介
摘要:BOM: Browser Object Model, 浏览器对象模型. 对应浏览器的js内置对象: window 1. history: 浏览器历史对象 1) back(): 后退一个页面 2) forward(): 前进一个页面 3) go(参数): 参数表示前进或者后退的页面数量: 正整数: 前
阅读全文
posted @
2022-04-11 14:32
小小程序猿level1
阅读(59)
推荐(0)
33js事件
摘要:@charset "UTF-8";*{margin: 0;padding: 0}.box{ width: 50px; height: 10px;}.box1{ width: 100px; height: 100px; background-color: red; margin: 50px auto;
阅读全文
posted @
2022-04-11 14:21
小小程序猿level1
阅读(48)
推荐(0)
32js函数
摘要:<head> <meta charset="UTF-8"> <title>js函数</title></head><body> <!-- 函数: 相当于java的方法 声明函数的语法(3种): 1. 显式声明: 语法: function 函数名(形参列表){ //函数体代码 } 使用: 函数名(实参)
阅读全文
posted @
2022-04-11 12:01
小小程序猿level1
阅读(28)
推荐(0)
31js基础,内置对象
摘要:</head><body> <script> //1,Math工具 var num = parseInt(Math.random()*100)+1 document.write(num+"<br>"); document.write("<hr>"); //2,String var num2 = "a
阅读全文
posted @
2022-04-11 00:11
小小程序猿level1
阅读(23)
推荐(0)
30js基础,数组
摘要:<head> <meta charset="UTF-8"> <title>js数组</title></head><body> <script> //声明 var arr1 = []; var arr2 = new Array(); document.writeln("arr1长度为:"+arr1.l
阅读全文
posted @
2022-04-10 23:37
小小程序猿level1
阅读(29)
推荐(0)
29js基础,循环
摘要:<head> <meta charset="UTF-8"> <title>8循环结构</title></head><body> <script> //1,while循环 //2,do-while循环 //1,for循环 for (var i = 0; i <100 ; i++) { document
阅读全文
posted @
2022-04-10 16:51
小小程序猿level1
阅读(15)
推荐(0)
28js基础,选择结构
摘要:<head> <meta charset="UTF-8"> <title>7选择结构</title></head><body> <script> //if条件选择结构 var str = prompt("请输入用户名:","") if(str){ document.writeln("您输入的用户名是
阅读全文
posted @
2022-04-10 16:42
小小程序猿level1
阅读(12)
推荐(0)
27js基础,数据类型转换
摘要:<head> <meta charset="UTF-8"> <title>6js数据类型转换</title></head><body> <script> //1:普通转换 //将数据转换成整数,parseInt(参数); var n1 = "100" , n2 = "100.1" , n3 = "1
阅读全文
posted @
2022-04-10 14:09
小小程序猿level1
阅读(32)
推荐(0)
26js基础,运算符
摘要:<head> <meta charset="UTF-8"> <title>5运算符</title></head><body> <script> //1:赋值运算符 "=" //2:算术运算符 +,-,*,/,%,++,-- var str = "10"; document.writeln("str+
阅读全文
posted @
2022-04-10 12:57
小小程序猿level1
阅读(26)
推荐(0)
25js基础,三大基础弹框
摘要:<head> <meta charset="UTF-8"> <title>4三大基础弹框</title></head><body> <script> //三大基础弹框 //1:提示框(警告框),无返回值 //alert("危险操作") //2:确认框,返回值true/fourse //var n1
阅读全文
posted @
2022-04-10 11:43
小小程序猿level1
阅读(44)
推荐(0)
24js基础,数据类型
摘要:</head><body> <script> var n1 = 100 //整数 , n2 = 98.4 //浮点 , n3 = "apple" //字符串 , n4 = 'a' //字符 , n5 = true //布尔 , n6 = ["ert","wsde"] //数组 , n7 = { //
阅读全文
posted @
2022-04-10 11:26
小小程序猿level1
阅读(56)
推荐(0)
23ji基础,变量
摘要:<head> <meta charset="UTF-8"> <title>变量和数据类型</title></head><body> <script> /*变量的声明*/ var num; var n1=100; let num2 = "123ff"; let n2 = 89.4; document.
阅读全文
posted @
2022-04-10 11:25
小小程序猿level1
阅读(28)
推荐(0)
22js基础,js输出语句
摘要:<head> <meta charset="UTF-8"> <title>js输出语句</title></head><body> <script> document.write("大漂亮,我爱你"); document.writeln("大漂亮,我爱你"); document.writeln("大漂
阅读全文
posted @
2022-04-09 21:55
小小程序猿level1
阅读(43)
推荐(0)
21js基础,js的引用方式
摘要:<head> <meta charset="UTF-8"> <title>js调用方式</title></head><body> <!-- JavaScript: 目前最版本是第六代, 简称ES6 (ECMAScript) 是一种弱语言: 语法规则较弱 1.js的引用方式(3种): [1] 行内使用
阅读全文
posted @
2022-04-09 21:39
小小程序猿level1
阅读(281)
推荐(0)
20.绝对定位
摘要:.box{ width: 500px; height: 300px; border: solid; margin:50px auto; position: relative;}.sub-box{ width: 100px; height: 100px;}.bgc1{ background-color
阅读全文
posted @
2022-04-08 16:53
小小程序猿level1
阅读(46)
推荐(0)
18.定位文档说明
摘要:定位: 定位属性: position 定位属性值: 1) relative: 相对定位 参照物: 元素本身的文档流位置 文档流状态: 不脱离文档流 移动方式: 通过top,bottom,left,right属性移动元素 常用单位px 正数向元素内部移动. 例: top: 50px; 向下移动50px
阅读全文
posted @
2022-04-08 14:25
小小程序猿level1
阅读(64)
推荐(0)
19.相对定位
摘要:.box{ width: 500px; height: 300px; border: solid; margin:50px auto;}.sub-box{ width: 100px; height: 100px;}.bgc1{ background-color: darkorange;}.bgc2{
阅读全文
posted @
2022-04-08 14:25
小小程序猿level1
阅读(24)
推荐(0)
17.浮动
摘要:<meta charset="UTF-8"> <title>浮动</title> <style> *{margin: 0px;padding: 0px} .box{ width: 395px; /* height: 400px;*/ border-style: solid; border-color
阅读全文
posted @
2022-04-07 17:39
小小程序猿level1
阅读(29)
推荐(0)