04 2021 档案
摘要:元素的获取5种方式的总结:document.getElementById("id的属性")得到的是单个元素的,书写id的属性时候不要添加#号;document.getElementsByClassName("class的属性")得到的是一个元素对象集合()这是一个伪元素,数组元素是元素对象;不要加.
阅读全文
摘要://引入的路径是一个本地服务器的路径,引用的时候自己手动修改,样式没有写,自己去写 //注册页面的js分为三个js //第一个是请求数据的ajax.js let $ = {//做公共的数据请求 baseUrl:"http://localhost:9999/", ajax(json) {//用来请求数
阅读全文
摘要:<?php //php连数据库 //mysqli_connect(域名,账号,密码,库名) header("content-type:text/html;charset=utf-8"); // $host = 'localhost:3306'; //本地环境的账户名和密码 $user = $mi='
阅读全文
摘要:// path 路径 // type 数据提交的方式 get/post // data 前端需要带的数据 {} // dataType 默认是json格式 // successCB 数据拿到之后所要做的事情 function function ajax(option) { const { path
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content
阅读全文
摘要://第一种:是数字的取整,因为math.random()的取值范围是大于等于0,小于1,取不到1 document.write(parseInt(Math.random()*3))//结果是0,1,2 //第二种:要想取到从1-3的随机数必须从要在产生随机数的后面加上1才可以从1开始取值,娶不到0;
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content
阅读全文
摘要:Js 中为数组提供了多种遍历方式 const ary = ['a', 'b', 'c']; // 最基本的方式, 只能遍历下标有序递增的数组 for (let i=0; i<ary.length; i++) { console.log(i, ary[i]); // 0 a 1 b 2 c } //
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi
阅读全文
摘要:在做项目的过程中,使用正则表达式来匹配一段文本中的特定种类字符,是比较常用的一种方式,下面是对常用的正则匹配做了一个归纳整理。 1、匹配中文:[\u4e00-\u9fa5] 2、英文字母:[a-zA-Z] 3、数字:[0-9]4、匹配中文,英文字母和数字及下划线:^[\u4e00-\u9fa5_a-
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-e
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-e
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi
阅读全文
摘要:<!-- * @Author: your name * @Date: 2021-04-08 14:30:47 * @LastEditTime: 2021-04-08 19:16:21 * @LastEditors: Please set LastEditors * @Description: In
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content
阅读全文