• 手机版

    扫码体验手机版

  • 微信公众号

    扫码关注公众号

国内首家协议开发

软芯音视解码保护平台

在线
客服

发布
需求

在线
聊天

天盟
APP

天盟APP下载

关注
微信

微信扫一扫访问
顶部

DOM事件的模态框问题(IE事件处理程序),代码报错不知原因

*{        margin:0;        padding: 0;      }      a{        color: #000;        text-decoration: none;      }      #bacg{        background:#000;        opacity: 0.4;        position: absolute;        top: 0;        left: 0;        right: 0;        bottom: 0;        display: none;      }      #div1{        border:1px solid #ccc;        width: 350px;        border-radius: 5px;        position: absolute;        left: 50%;        top: 50%;        margin: -95px 0 0 -175px;        background: #fff;        display: none;      }      #header{        padding: 5px 0 10px 0;        border-bottom: 1px solid #eee;      }      #header h3{        float: left;        font-size: 26px;      }      #header a{        float: right;        font-size: 20px;      }      #header:after{        content: "";        display: block;        clear: both;      }      #content{        padding: 25px 0;        line-height: 30px;        border-bottom: 1px solid #eee;      }      #footer{        padding: 10px 0 0 0;      }      #footer a{        float: right;        padding: 5px;      }      #footer:after{        content: "";        display: block;        clear: both;      }    点击  111
                  我是标题

          ×      
                我是内容1
          我是内容2
      
              取消        确定           
  
  
111002z6jl222ltlpt2l2k.jpg

报错了,不知道错在哪里,麻烦大神解毒一下

免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。

版权声明:作者保留权利,不代表天盟立场。

使用道具 举报

全部参与2

attachEvent是IE支持的,而chrome是支持addEventListener

使用道具 举报

问题解决了,把这段代码放到IE浏览器下运行就可以了.这个是在chorem浏览器下的报错

使用道具 举报

发新帖

发布任务需求已有1031167位用户正在使用天盟网服务

发布分类: *
任务预算: *
需求内容: *
手机号码: *
任务商家报价为
  • 预算价 :
  • 成交价 :
  • 完工期 :
  • 质保期 :

* 最终任务项目以服务商报价、双方协商为准!