第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

可以幫忙看一下嗎,點(diǎn)擊next 圖片不變

<!DOCTYPE html>

<html>


<head>

<meta http-equiv="content-type" content="text/html" charset="utf-8" />

<style type="text/css">

body,

div,

span {

padding: 0;

margin: 0;

}

#box {

height: 450px;

position: relative;

overflow: hidden;

width: 900px;

border: 2px solid salmon;

}

#list {

width: 4500px;

height: 450px;

position: absolute;

z-index: 1;

}

#list img {

float: left;

width: 900px;

height: 450px;

}

.arrow {

position: absolute;

width: 50px;

height: 50px;

background-color: silver;

cursor: pointer;

font-size: 30px;

text-align: center;

line-height: 50px;

top: 225px;

display: none;

z-index: 2;

color: white;

font-weight: bold;

text-decoration: none;

}

.arrow:hover{

background-color: bisque;

}

#prev {

left: 20px;

}

#next {

right: 20px;

}

#box:hover .arrow {

display: block;

}

#buttoms {

position: absolute;

bottom: 20px;

width: 100px;

height: 10px;

z-index: 2;

text-align: center;

left: 450px;

}

#buttoms span{

width: 20px;

margin-right: 10px;

float: left;

border-radius: 50%;

border: 1px solid gainsboro;

cursor: pointer;

background-color: #D3D3D3;

}

#buttoms on{

background-color: sandybrown;

}

</style>

<script type="text/javascript">

window.onload=function(){

var box=document.getElementById("box");

var list=document.getElementById("list");

var buttoms=document.getElementById("buttoms").getElementsByTagName("span");

var prev=document.getElementById("prev");

var next=document.getElementById("next");

}

// function animate(offset){

// list.style.left=parseInt(list.style.left)+offset+"px";

// }

next.onclick=function(){

list.style.left=parseInt(list.style.left)-900+"px";

}

prev.onclick=function(){

list.style.left=parseInt(list.style.left)+900+"px";

}

</script>


</head>


<body>

<div id="box">

<div id="list" style="left: -900px;">

<img src="../images/pic11.jpg" alt="3" />

<img src="../images/pic04.jpg" alt="1" />

<img src="../images/pic08.jpg" alt="2" />

<img src="../images/pic11.jpg" alt="3" />

<img src="../images/pic04.jpg" alt="1" />

</div>

<div id="buttoms">

<span index="1" class="on"></span>

<span index="2" ></span>

<span index="3" ></span>

</div>

<a href="javascript:;" class="arrow" id="prev">&lt;</a>

<a href="javascript:;" class="arrow" id="next">&gt;</a>


</div>

</body>


</html>


正在回答

2 回答

<script type="text/javascript">

window.onload=function(){

var box=document.getElementById("box");

var list=document.getElementById("list");

var buttoms=document.getElementById("buttoms").getElementsByTagName("span");

var prev=document.getElementById("prev");

var next=document.getElementById("next");

}(將這個(gè)大括號(hào)移到</script>前面)

// function animate(offset){

// list.style.left=parseInt(list.style.left)+offset+"px";

// }


next.onclick=function(){

list.style.left=parseInt(list.style.left)-900+"px";

}

prev.onclick=function(){

list.style.left=parseInt(list.style.left)+900+"px";

}

</script>


0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

哈爾波兒 提問(wèn)者

好的,謝謝了
2018-08-16 回復(fù) 有任何疑惑可以回復(fù)我~
#2

假裝自己是全棧

移動(dòng)了大括號(hào),next脫離了局部作用域顯示next is not defined !
2018-09-01 回復(fù) 有任何疑惑可以回復(fù)我~

window.onload=function(){}你應(yīng)該去了解一下這個(gè)知識(shí)點(diǎn)

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

可以幫忙看一下嗎,點(diǎn)擊next 圖片不變

我要回答 關(guān)注問(wèn)題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)