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

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

為什么在點修改p2的時候沒有反應(yīng)呢?

<!DOCTYPE HTML>

<html>

<head>

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

<title>className屬性</title>

<style type="text/css">

? ? body{ font-size:20px;}

? ? p.one{

border:1px solid #eee;

width:230px;

height:50px;

background:#ccc;

color:red;

? ? }

p.two{

border:1px solid #ccc;

width:230px;

height:50px;

background:#9CF;

color:blue;

}

</style>

</head>

<body>

? <p id="p1" class="two">123</p>

? <input type="button" onclick="add()" value="xiugai p1">

? <p id="p2" class="one">456</p>

? <input type="button" onclick="add1()" value="xiugai p2">

? <script type="text/javascript">

? function add(){

? ? ?var p1= document.getElementById("p1");

? ? ?p1.className="one";

? }

? function add1(){

? ? ? var p2=document.getElemnetById("p2");

? ? ? p2.className="two";

? }

? </script>

??

</body>

</html>


正在回答

1 回答

代碼打錯了

function add1(){

? ? ? var p2=document.getElemnetById("p2");

? ? ? p2.className="two";

? }

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

慕粉4403103 提問者

非常感謝!
2016-12-01 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

為什么在點修改p2的時候沒有反應(yīng)呢?

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

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

幫助反饋 APP下載

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

公眾號

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