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

有哪些漫画做的好的网站/关键词排名关键词快速排名

有哪些漫画做的好的网站,关键词排名关键词快速排名,上海十大公司排名,精准客户信息一条多少钱事件对象4e:e.stoppropagation():阻止事件继续传播 ——制作弹出层&#xff1a;点击指定位置框框弹出&#xff0c;点击其它位置页面关闭 简单理解&#xff1a; 在这里插入代码片 <!DOCTYPE html> <html lang"en"><head><meta charset"UTF…

事件对象4e:e.stoppropagation():阻止事件继续传播 ——制作弹出层:点击指定位置框框弹出,点击其它位置页面关闭
简单理解:

在这里插入代码片
<!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><style>#box {width: 200px;height: 200px;margin: 100px;background-color: rgb(194, 194, 99);}#box1 {width: 100px;height: 100px;margin: 100px;position: absolute;background-color: pink;}h1 {background-color: green;}</style>
</head><body><div id="box"></div><h1>hello</h1><div id="box1"></div>
</body>
<script>var oBox = document.getElementById('box')var oBox1 = document.getElementById('box1')var oH1 = document.querySelector('h1')oBox.onclick = function (e) {console.log('box');oBox1.style.backgroundColor = 'green'e.stopPropagation()}oH1.onclick = function (e) {console.log('h1');oBox1.style.backgroundColor = 'red'e.stopPropagation()}document.onclick = function (e) {console.log('document');oBox1.style.backgroundColor = 'blue'}oBox1.onclick = function (e) {console.log('box1');e.stopPropagation()}
</script></html>

小例子:制作弹出层

在这里插入代码片
<!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>事件对象之阻止事件继续传播e.stopPropagation()</title><style>#box {width: 200px;height: 200px;margin: 100px;background-color: green;position: absolute;display: none;}</style>
</head><body><!-- 制作弹出层:点击按钮显示弹出层,点击其它地方弹出层关闭 --><button>弹出</button><div id="box"></div>
</body>
<script>var obtn = document.querySelector('button')var obox = document.getElementById('box')obtn.onclick = function (e) {// 阻止该事件传播到documente.stopPropagation();box.style.display = 'block'}document.onclick = function (e) {box.style.display = 'none'}// 点击弹出层内部时,不能关闭弹出层obox.onclick = function (e) {// 阻止事件传播到documente.stopPropagation();}
</script></html>
http://www.jmfq.cn/news/5196367.html

相关文章:

  • 搭建免费网站/公司网络推广
  • 有没有做皮艺的网站/整合营销是什么
  • 做海报的网站知乎/seo简单优化操作步骤
  • 微舍 微网站 怎么做/网络营销主要是学什么的
  • 上海最专业的网站设/汕头百度seo公司
  • 如何分析网站关键词/广东网站营销seo费用
  • 中国做b2b外贸的网站有哪些/潍坊做网站哪家好
  • 哪个网站做任务能赚钱/权重查询
  • 织梦怎么制作网站/百度推广哪家做的最好
  • 金昌北京网站建设/手游推广渠道平台
  • 企业网站作用/产品市场调研怎么做
  • 昌邑做网站的公司/网站建设培训机构
  • 网站富文本的内容怎么做/怎样宣传网站
  • wordpress php 结构/seovip培训
  • 简述企业网站建设的目的有哪些/长沙网站关键词排名推广公司
  • 清仓在什么网站做/百度网站排名优化价格
  • 互联网行业的开发网站/百度关键词挖掘
  • 河北邯郸什么时候解封/网站优化方案模板
  • 动态网站开发视频教程/西安百度百科
  • 广州响应网站建设/域名在线查询
  • 河南网站建设哪里好/在线推广
  • 门户类网站模板/百度一下搜索一下
  • 网上书店网站建设实训报告总结/百度推广引流
  • 门户网站定义/无安全警告的浏览器
  • vs2017 做c 网站/seo入门教程视频
  • 如何开发wap网站/高清视频网络服务器
  • 做网站多大/上海广告推广
  • 个人+网站可以做导航吗/网络营销swot分析
  • 湖北外贸网站建设费用/西点培训学校
  • repress wordpress/北京seo顾问推推蛙