当前位置: 首页 > news >正文

网站使用了seo优化工具怎么检测厦门seo推广

网站使用了seo优化工具怎么检测,厦门seo推广,flash网站制作教程,新版 网站在建设中...1.两种面向编程思想 2.构造函数实现封装以及存在的问题 下面就引出了原型对象 3.原型对象prototype 共享原理图&#xff1a; 4.数组扩展案例-求最大值和数组求和 <!DOCTYPE html> <html lang"en"><head><meta charset"UTF-8"><…

1.两种面向编程思想

2.构造函数实现封装以及存在的问题

下面就引出了原型对象

3.原型对象prototype

共享原理图:

4.数组扩展案例-求最大值和数组求和

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title>
</head><body><script>// 自己定义 数组扩展方法  求和 和 最大值 // 1. 我们定义的这个方法,任何一个数组实例对象都可以使用// 2. 自定义的方法写到  数组.prototype 身上// 1. 最大值const arr = [1, 2, 3]Array.prototype.max = function () {// 展开运算符return Math.max(...this)// 原型函数里面的this 指向谁? 实例对象 arr}// 2. 最小值Array.prototype.min = function () {// 展开运算符return Math.min(...this)// 原型函数里面的this 指向谁? 实例对象 arr}console.log(arr.max())console.log([2, 5, 9].max())console.log(arr.min())// const arr = new Array(1, 2)// console.log(arr)// 3. 求和 方法 Array.prototype.sum = function () {return this.reduce((prev, item) => prev + item, 0)}console.log([1, 2, 3].sum())console.log([11, 21, 31].sum())</script>
</body></html>

5.constructor属性以及应用

6.对象原型__proto__

7.原型继承

8.原型链以及instanceof运算符

9.综合案例-模态框构造函数写法

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>面向对象封装消息提示</title><style>.modal {width: 300px;min-height: 100px;box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);border-radius: 4px;position: fixed;z-index: 999;left: 50%;top: 50%;transform: translate3d(-50%, -50%, 0);background-color: #fff;}.modal .header {line-height: 40px;padding: 0 10px;position: relative;font-size: 20px;}.modal .header i {font-style: normal;color: #999;position: absolute;right: 15px;top: -2px;cursor: pointer;}.modal .body {text-align: center;padding: 10px;}.modal .footer {display: flex;justify-content: flex-end;padding: 10px;}.modal .footer a {padding: 3px 8px;background: #ccc;text-decoration: none;color: #fff;border-radius: 2px;margin-right: 10px;font-size: 14px;}.modal .footer a.submit {background-color: #369;}</style>
</head><body><button id="delete">删除</button><button id="login">登录</button><!-- <div class="modal"><div class="header">温馨提示 <i>x</i></div><div class="body">您没有删除权限操作</div></div> --><script>// 1.  模态框的构造函数function Modal(title = '', message = '') {// 公共的属性部分this.title = titlethis.message = message// 因为盒子是公共的// 1. 创建 一定不要忘了加 this this.modalBox = document.createElement('div')// 2. 添加类名this.modalBox.className = 'modal'// 3. 填充内容 更换数据this.modalBox.innerHTML = `<div class="header">${this.title} <i>x</i></div><div class="body">${this.message}</div>`// console.log(this.modalBox)}// 2. 打开方法 挂载 到 模态框的构造函数原型身上Modal.prototype.open = function () {if (!document.querySelector('.modal')) {// 把刚才创建的盒子 modalBox  渲染到 页面中  父元素.appendChild(子元素)document.body.appendChild(this.modalBox)// 获取 x  调用关闭方法this.modalBox.querySelector('i').addEventListener('click', () => {// 箭头函数没有this 上一级作用域的this// 这个this 指向 m this.close()})}}// 3. 关闭方法 挂载 到 模态框的构造函数原型身上Modal.prototype.close = function () {document.body.removeChild(this.modalBox)}// 4. 按钮点击document.querySelector('#delete').addEventListener('click', () => {const m = new Modal('温馨提示', '您没有权限删除')// 调用 打开方法m.open()})// 5. 按钮点击document.querySelector('#login').addEventListener('click', () => {const m = new Modal('友情提示', '您还么有注册账号')// 调用 打开方法m.open()})</script>
</body></html>

http://www.khdw.cn/news/15341.html

相关文章:

  • 中国做网站的公司排名手机系统优化工具
  • 石家庄网站建设wsjzseo营销是什么
  • wordpress编辑网站注册域名费用一般多少钱
  • 厦门网站建设百度网盘下载安装
  • 营销型网站建设是什么意思杭州seo教程
  • wordpress 怎么安装ssl海南seo代理加盟供应商
  • 软件工程师英文今日头条搜索优化怎么做
  • 网站做优化的必要性腾讯广告投放平台官网
  • 太原建站模板网站seo的工作内容主要包括
  • 有哪些企业会找人做网站建设谷歌搜索引擎seo
  • 网页建站分为几个类型长沙seo技术培训
  • 外网网站电脑培训班零基础网课
  • 自动建站网站系统域名百度关键词代做排名
  • 程序员用的编程软件网页优化方法
  • 旅行网站开发背景推广一般收多少钱
  • 东莞莞城网站建设凌哥seo
  • 短租网站那家做的好处百度商家怎么入驻
  • 找做废薄膜网站全网热搜榜
  • 江西企业网站建设价格中国企业培训网
  • 新做的网站怎样让百度收录百度推广关键词怎么设置好
  • 西安注册公司流程长沙 建站优化
  • 环保类网站建设搜索引擎优化简称
  • 系统下载网站源码seo刷排名公司
  • 邯郸网站建设在哪里软文代写文案
  • 南京驰铭做网站公司厦门seo收费
  • 做网站必须要注册公司么seo服务靠谱吗
  • 杭州网站建设V芯ee8888e专业营销团队外包公司
  • 南京做电商网站的公司网页模板图片
  • 一家专门做动漫的网站竞价 推广
  • b站如何推广自己的作品宁波seo营销