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

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

找不到錯(cuò)誤呀,求幫忙

?<form>

? <!--當(dāng)點(diǎn)擊相應(yīng)按鈕,執(zhí)行相應(yīng)操作,為按鈕添加相應(yīng)事件-->

? ? <input type="button" onClick="chang1()" value="改變顏色" > ?

? ? <input type="button" onClick="chang2()" value="改變寬高" >

? ? <input type="button" onClick="chang3()" value="隱藏內(nèi)容" >

? ? <input type="button" onClick="chang4()" value="顯示內(nèi)容" >

? ? <input type="button" onClick="chang5()" value="取消設(shè)置" >

? </form>

? <script type="text/javascript">

? var mystr=document.getElementById("txt");

//定義"改變顏色"的函數(shù)

? function chang1(){

? ? ? mystr.style.color="red";

? ? ? mystr.style.backgroundColor="green";

? }


//定義"改變寬高"的函數(shù)

? function chang2(){

? ? ? mystr.style.wedth="100px";

? ? ? mystr.style.height="400px";

? }


//定義"隱藏內(nèi)容"的函數(shù)

? ?function chang3(){

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

? ?}


//定義"顯示內(nèi)容"的函數(shù)

? ?function chang4(){

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

? ?}


//定義"取消設(shè)置"的函數(shù)

? ?function chang5(){

? ? ? ?var mymassage=confirm("是否取消設(shè)置?");

? ? ? ?if(mymassage==true)

? ? ? ?{

? ? ? ? ? ? ?txt.removeAttribute("style");

? ?}



? </script>


正在回答

2 回答

??function?chang5(){
???????var?mymassage=confirm("是否取消設(shè)置?");
???????if(mymassage==true)
???????{
?????????????txt.removeAttribute("style");
???}
???txt是什么????你上面不是獲取了嗎???mystr.removeAttribute("style")


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

123Zhou123 提問者

找不到錯(cuò)誤瞎試的,mystr.removeAttribute("style")這個(gè)我也試過了,也不對(duì)。。。。。
2015-07-19 回復(fù) 有任何疑惑可以回復(fù)我~

找不到錯(cuò)誤瞎試的,mystr.removeAttribute("style")這個(gè)我也試過了,也不對(duì)。。。。。

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

淺水了

那是什么錯(cuò)誤?
2015-07-19 回復(fù) 有任何疑惑可以回復(fù)我~
#2

123Zhou123 提問者 回復(fù) 淺水了

哦,漏掉了一個(gè)括號(hào) ,謝謝幫忙O(∩_∩)O~~~~~~~~
2015-07-19 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消
JavaScript入門篇
  • 參與學(xué)習(xí)       741083    人
  • 解答問題       9811    個(gè)

JavaScript做為一名Web工程師的必備技術(shù),本教程讓您快速入門

進(jìn)入課程

找不到錯(cuò)誤呀,求幫忙

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

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

幫助反饋 APP下載

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

公眾號(hào)

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