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

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

問題出在哪里了?沒有顯示效果

<!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=utf-8" />

<title>display</title>

<script type="text/javascript">

function hidetext()

{

var mychar=document.getElementById("con").style.display="none";

}

function showtext()

{

? var mychar=document.getElementById("con")

? mychar=style.display="block";


}

</script>


</head>


<body>

<p id="con">這是我的第一個(gè)dom練習(xí)代碼</p>

<form>

<input type="button" onclick="hidetext" value="不顯示段落內(nèi)容" />

<input type="button" onclick="showtext" value="顯示內(nèi)容" />

</form>

</body>

</html>

為什么不能隱藏和顯示??? ?問題出在哪里?

正在回答

1 回答

<!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=utf-8"?/>
<title>display</title>
<script?type="text/javascript">
function?hidetext()
{
var?mychar=document.getElementById("con");
????mychar.style.display="none";
}
function?showtext()
{
??var?mychar=document.getElementById("con");
??mychar.style.display="block";

}
</script>

</head>

<body>
<p?id="con">這是我的第一個(gè)dom練習(xí)代碼</p>
<form>
<input?type="button"?onclick="hidetext()"?value="不顯示段落內(nèi)容"?/>
<input?type="button"?onclick="showtext()"?value="顯示內(nèi)容"?/>
</form>
</body>
</html>

調(diào)用出問題,而且showtext函數(shù)也沒寫對(duì)

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

馬小黑 提問者

的確是出了這兩個(gè)問題,非常感謝!
2015-07-13 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

問題出在哪里了?沒有顯示效果

我要回答 關(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)