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

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

為什么點(diǎn)完remove的按鈕之后這個(gè)按鈕就消失了?

<!DOCTYPE?HTML>
<html>
<head>
<meta?http-equiv="Content-Type"?Content="text/html;?charset=utf-8"?/>
<title>javascript</title>
<style?type="text/css">
body{font-size:12px;}
#txt{
????height:400px;
????width:600px;
	border:#333?solid?1px;
	padding:5px;}
p{
	line-height:18px;
	text-indent:2em;}

</style>

</head>
<body>
??<h2?id="con">JavaScript?course</H2>
??<div?id="txt">?
?????<h5>JavaScript?index</h5>
????????<p>1.?JavaScript?elementary</p>
????????<p>2.?JavaScript?advanced</p>
????????<p>3.?more?functions</p>
??</div>
??<form>
??<!--當(dāng)點(diǎn)擊相應(yīng)按鈕,執(zhí)行相應(yīng)操作,為按鈕添加相應(yīng)事件-->
????<input?type="button"?value="change?color"?onclick="changecolor()">??
????<input?type="button"?value="change?size"?onclick="changesize()">
????<input?type="button"?value="hide?content"?onclick="hidecontent()">
????<input?type="button"?value="show?content"?onclick="showcontent()">
????<input?type="button"?value="remove?all?style"?onclick="remove()">
??</form>
??<script?type="text/javascript">
??	var?text=document.getElementById("txt");
//定義"改變顏色"的函數(shù)
function?changecolor(){
			text.style.color="red";
			text.style.backgroundColor="gray";
		};

//定義"改變寬高"的函數(shù)
function?changesize?()?{
	txt.style.width="200px";
	txt.style.height="200px";
}

//定義"隱藏內(nèi)容"的函數(shù)
function?hidecontent?()?{
	txt.style.display="none";
}

//定義"顯示內(nèi)容"的函數(shù)
function?showcontent?()?{
	txt.style.display="block";
}

//定義"取消設(shè)置"的函數(shù)
function?remove?()?{
	text.removeAttribute("style");
}




??</script>
</body>
</html>


正在回答

5 回答

函數(shù)名remove換成其他的,我也是這個(gè)問題,換掉就可以了

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

瀅芷 提問者

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

代碼輸錯(cuò)了兄弟,??txt.style.width="200px";請問這句是什么意思,是text吧

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

IE8-11,edge成功運(yùn)行,沒問題

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

http://img1.sycdn.imooc.com//58205d790001c0f507350568.jpg確實(shí)沒有啊,我用的搜狗,ie和edge都不行

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

沒有吧 你重新打開試試 ?或者換個(gè)瀏覽器 ,我運(yùn)行了一下,沒有問題的啊。

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

舉報(bào)

0/150
提交
取消

為什么點(diǎn)完remove的按鈕之后這個(gè)按鈕就消失了?

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

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

幫助反饋 APP下載

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

公眾號(hào)

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