TypeError: Cannot read property 'style' of null怎么解决
<!doctypehtml><html><head><metacharset="utf-8"><title>无标题文档</title><metaname="viewpor...
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" href="../css/reset.css" type="text/css"/>
<link rel="stylesheet" href="../css/common.css" type="text/css"/>
<script src="../js/iscroll.js"></script>
</head>
<body>
<div class="wrap" id="wrapper">
<section id="guide-page">
<ul class="first-page">
<li><a href="#"><img src="../images/bg2.png"/></a></li>
<li><a href="#"><img src="../images/bg3.png"/></a></li>
<li><a href="register.html"><img src="../images/bg4.png"/></a></li>
</ul>
</section>
<div id="dot">
<div class="dian"></div>
</div>
</div>
<script>
window.onload=function (){
var myscroll;
myscroll=new iScroll("#guide-page",{
scrollX:true,
scrollY:false,
snap:true,
//滚动条
indicators:{
el:document.getElementById("dot"),
resize:false
}
}
);
}
</script>
</body>
</html>
是谷歌浏览器里console显示的错误 展开
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" href="../css/reset.css" type="text/css"/>
<link rel="stylesheet" href="../css/common.css" type="text/css"/>
<script src="../js/iscroll.js"></script>
</head>
<body>
<div class="wrap" id="wrapper">
<section id="guide-page">
<ul class="first-page">
<li><a href="#"><img src="../images/bg2.png"/></a></li>
<li><a href="#"><img src="../images/bg3.png"/></a></li>
<li><a href="register.html"><img src="../images/bg4.png"/></a></li>
</ul>
</section>
<div id="dot">
<div class="dian"></div>
</div>
</div>
<script>
window.onload=function (){
var myscroll;
myscroll=new iScroll("#guide-page",{
scrollX:true,
scrollY:false,
snap:true,
//滚动条
indicators:{
el:document.getElementById("dot"),
resize:false
}
}
);
}
</script>
</body>
</html>
是谷歌浏览器里console显示的错误 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询