亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

求問,為何切換不了選項卡~ 理解了但是找不到錯誤

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<title>無標題文檔</title>

<style type="text/css">

*{padding:0px;margin:0;font:12px normal "Times New Roman", Times, serif;}

#table{width:280px;margin:20px;padding:5px;height:150px;}

#table ul{list-style:none;display:block;border-bottom:2px #CC3300 solid;height:30px;line-height:30px;}

#table ul li{cursor:pointer;float:left;background:#fff;margin:0 10px;height:28px;line-height:28px;list-style:none;border:1px solid #00CCCC;border-bottom:none;display:inline-block;width:60px;text-align:center;}

#table ul li.on{border-top:3px solid #00CCCC;border-bottom:2px solid #fff;}

#table div{height:150px;line-height:25px;border:1px solid #00CCCC;border-top:none;padding:10px;}

.hide{display:none;}

a{text-decoration:none};

</style>

<script type="text/javascript">

window.onload=function(){

var Tab=document.getElementById("table");

var Li=document.getElementsByTagName("li");

var Div=Tab.getElementsByTagName("div");

for(var i=0;i<Li.length;i++)

{

? ?Li[i].index=i;

? ?Li[i].onclick=function(){

? ?for(var j=0;j<Li.length;j++)

? ?{

? ? ? Li[j].className="";

?div[j].className="hide";

}

this.className="on";

div[this.index].className="";

}

};

}

function change(){

this.style.color:blue;

}

</script>

</head>


<body>

? ? ? <div id="table">

? ? ? <ul>

? ? ?<li class="on">房產</li>

?<li>家居</li>

? ? ? ? ?<li>二手房</li>?

</ul>

? <div class="show">

? ? <p><a onclick="change()" href="#">275萬購昌平鄰鐵三居 總價20萬買一居</a></p><br />

<p><a onclick="change()" href="#">200萬內購五環三居 140萬安家東三環</a></p><br />

? ? ? ? ?<p><a onclick="change()" href="#">北京首現零首付樓盤 53萬購東5環50平</a></p><br />

? ? ? ? ?<p><a onclick="change()" href="#">京樓盤直降5000 中信府 公園樓王現房</a></p>

? </div>?

? ?<div class="hide">

? ? ? ? ? <p><a onclick="change()" href="#">40平出租屋大改造 美少女的混搭小窩</a></p><br />

? ? ? ? ? <p><a onclick="change()" href="#">經典清新簡歐愛家 90平老房煥發新生</a></p><br />

? ? ? ? ? <p><a onclick="change()" href="#">新中式的酷色溫情 66平撞色活潑家居</a></p><br />

? ? ? ? ? <p><a onclick="change()" href="#">瓷磚就像選好老婆 衛生間煙道的設計</a></p>

</div>

<div class="hide">

?<p><a> 通州豪華3居260萬 二環稀缺2居250w甩</a></p><br />

? ? ? ? ? <p><a> 西3環通透2居290萬 130萬2居限量搶購</a></p><br />

? ? ? ? ? <p><a> 黃城根小學學區僅260萬 121平70萬拋!</a></p><br />

? ? ? ? ? <p><a> 獨家別墅280萬 蘇州橋2居優惠價248萬</a></p>

</div>

?</div>

</body>

</html>


正在回答

1 回答

http://img1.sycdn.imooc.com//55d3e7cf000115d404790123.jpgthis是哪冒出來的?change函數中也沒傳參數啊

0 回復 有任何疑惑可以回復我~
#1

qzuser_2761 提問者

原來是這樣,可是我改掉了這個 選項卡的切換還是沒有成功0.0 求解
2015-08-19 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

求問,為何切換不了選項卡~ 理解了但是找不到錯誤

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號