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

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

只用一個(gè)按鍵顯示隱藏,怎么弄

只用一個(gè)按鍵顯示隱藏,怎么弄

正在回答

5 回答

<p id="by" >sssssssssssssssssss</p>


<input id="btn" type="button" value="點(diǎn)擊隱藏" onclick="ove()">


<script>


function ove(){


var bb = document.getElementById('by');


if(bb.style.display !='none'){


bb.style.display='none';

btn.value="顯示內(nèi)容";


}else{


bb.style.display='block';

btn.value="點(diǎn)擊隱藏";

}


}


</script>


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

<!DOCTYPE HTML>

<html>

<head>

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

<title>display</title>

? ? <script type="text/javascript">?

? ? ? ? var i=0;

? ? ? ? function modifytext()??

{??

? if(i%2==0)

? ? ? ? ? {

? ? ? ? ? ? con.style.display="none";

? ? ? ? ? ? btn.value="顯示內(nèi)容";

? ? ? ? ? ? i++;

? ? ? ? ? }

? ? ? ? ? else

? ? ? ? ? {

? ? ? ? ? ? con.style.display="block";

? ? ? ? ? ? btn.value="隱藏內(nèi)容";

? ? ? ? ? ? i++;

? ? ? ? ? }

}

? ? </script>?

</head>?

<body>??

? ? <h1>JavaScript</h1>??

? ? <p id="con">做為一個(gè)Web開發(fā)師來說,如果你想提供漂亮的網(wǎng)頁(yè)、令用戶滿意的上網(wǎng)體驗(yàn),JavaScript是必不可少的工具。</p>?

? ? <form>

? ? ? ?<input type="button" id="btn" onclick="modifytext()" value="隱藏內(nèi)容" />?

? ? </form>

</body>?

</html>



0 回復(fù) 有任何疑惑可以回復(fù)我~
<!DOCTYPE?HTML><html><head><meta?http-equiv="Content-Type"?content="text/html;?charset="UTF-8"><title>display</title>????<script?type="text/javascript">?????????var?i=0;????????function?modifytext()??		{??		??if(i%2==0)??????????{????????????con.style.display="none";????????????btn.value="顯示內(nèi)容";????????????i++;??????????}??????????else??????????{????????????con.style.display="block";????????????btn.value="隱藏內(nèi)容";????????????i++;??????????}		}????</script>?</head>?<body>??????<h1>JavaScript</h1>??????<p?id="con">做為一個(gè)Web開發(fā)師來說,如果你想提供漂亮的網(wǎng)頁(yè)、令用戶滿意的上網(wǎng)體驗(yàn),JavaScript是必不可少的工具。</p>?????<form>???????<input?type="button"?id="btn"?onclick="modifytext()"?value="隱藏內(nèi)容"?/>?????</form></body>?</html>


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

<!DOCTYPE HTML>

<html>

<head>

</head>

<body>


<p id="clear">刮風(fēng)這天,我喜歡握著你手</p>

<form>

<input type="button" value="顯示/隱藏" onclick="modify()"/>

</form>

<script>

var s=1;

function modify()

{

if(s==1)

{

document.getElementById('clear').style.display = 'none';

s=2;

}

else if(s==2)

{

document.getElementById('clear').style.display='block';

s=1;

}

}

?

</script>

</body>

</html>


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

<!DOCTYPE HTML>

<html>

<head>

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

<title>className屬性</title>

</head>

<body>

? ? <p id="p1" > JavaScript使網(wǎng)頁(yè)顯示動(dòng)態(tài)效果并實(shí)現(xiàn)與用戶交互功能。</p>

????<input type="button" value="更改外觀" onclick="modify()"/>

<script type="text/javascript">

? function add(){

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

? ? ? ?p1.style.display="none"

? }

? function modify(){

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

? ? p2.style.display="block"

? }

</script>

</body>

</html>


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

螞蟻六條腿

這個(gè)是不是還缺少一個(gè)按鈕?
2017-10-04 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

只用一個(gè)按鍵顯示隱藏,怎么弄

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

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

幫助反饋 APP下載

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

公眾號(hào)

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