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

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

求大神指點(diǎn)哪里錯(cuò)了?

<!DOCTYPE?HTML>
<html>
????<head>
????????<meta?http-equiv="Content-Type"?content="text/html;?charset=gd2312">
????????<title>制作我的第一個(gè)網(wǎng)頁</title>
????</head>
????<body>
????????<h1>標(biāo)題1</h1>
?????
????????<script?language="javascript">
????????????????????????<form?name="name1"method="post"?action="">
?????????<input?name="submit"type="button"value="更換背景顏色"onclick="turncolour();"><!--這是插入一個(gè)按鍵-->
???????
???????????</form>
????????var?arraycolour=new?Array("olive","teal","red","blue","maroon","green","yellow");????<!--定義一個(gè)顏色數(shù)組-->
????????var?n=0;
????????function?turncolour()?????????????????????????????????????????????????????????<!--函數(shù)完成顏色變換-->???????????????????????????????????????
????????{
????????if(n==(arraycolour.length-1))?n=1;
????????n++;
????????document.bgColor=arraycolour[n];
?????????}
????????</script>
????</body>
</html>

http://img1.sycdn.imooc.com//59ba90d80001244a10480590.jpg

正在回答

2 回答

是不是實(shí)現(xiàn)變色啊!你把form的寫在<script></script>中了,把他放在外面就可以了!

<!DOCTYPE?HTML>

<html>

????<head>

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

????????<title>制作我的第一個(gè)網(wǎng)頁</title>

????</head>

????<body>

????????<h1>標(biāo)題1</h1>

? ? ? ? ?<form?name="name1"method="post"?action="">

?????????<input?name="submit"type="button"value="更換背景顏色"onclick="turncolour();"><!--這是插入一個(gè)按鍵-->

? ? ? ? </form>

????????<script?language="javascript">

????????var?arraycolour=new?Array("olive","teal","red","blue","maroon","green","yellow");????<!--定義一個(gè)顏色數(shù)組-->

????????var?n=0;

????????function?turncolour()?????????????????????????????????????????????????????????<!--函數(shù)完成顏色變換-->???????????????????????????????????????

????????{

????????if(n==(arraycolour.length-1))?n=1;

????????n++;

????????document.bgColor=arraycolour[n];

?????????}

????????</script>

????</body>

</html>


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

慕斯卡5410818 提問者

ok了 非常感謝!
2017-09-15 回復(fù) 有任何疑惑可以回復(fù)我~

你的告訴別人要實(shí)現(xiàn)什么


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

舉報(bào)

0/150
提交
取消

求大神指點(diǎn)哪里錯(cuò)了?

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

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

幫助反饋 APP下載

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

公眾號

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