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

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

點(diǎn)擊怎么沒(méi)反應(yīng)

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

? ? <input type="button" value="改變顏色" onclick="color()"> ?

? ? <input type="button" value="改變寬高" onclick="top()">

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

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

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

? </form>

? <script type="text/javascript">

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

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

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

function color()

{

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

? ? txtchar.style.backgroundColor="#D1BDA1";

}

function top() {

? ? txtchar.style.width="200px";

? ? txtchar.style.heigth="200px";

}

function display()

{

?txtchar.style.display="none";

}


正在回答

5 回答

應(yīng)該是 onClick="" 那里的c沒(méi)大寫(xiě)

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

function ?我換了個(gè)函數(shù)名就可以了 不知道是不是用了關(guān)鍵字命名函數(shù)

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

不對(duì)喲。我用你這個(gè)代碼跑的動(dòng)呢。你可能哪里出問(wèn)題吧,那些標(biāo)簽有對(duì)應(yīng)嗎?這些代碼內(nèi)容基本沒(méi)啥問(wèn)題。另onclick剛查了和測(cè)試一下也沒(méi)區(qū)分大小寫(xiě)。。

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

<form>

<input type="text" id="con" value="Test"></input>

<input type="text" id="txt" value="Test"></input>

? ?<input type="button" value="改變顏色" onclick="color()"> ?

? ? <input type="button" value="改變寬高" onclick="top()">

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

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

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

? </form>

? <script type="text/javascript">

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

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

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

function color()

{

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

? ? txtchar.style.backgroundColor="#D1BDA1";

}

function top() {

? ? txtchar.style.width="200px";

? ? txtchar.style.heigth="200px";

}

function display()

{

?txtchar.style.display="none";

}

</script>

以上是我測(cè)試代碼,可用。

你的代碼少了個(gè)<from>開(kāi)頭,以及你的代碼少了個(gè)</script>結(jié)束

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

onClick C大寫(xiě)

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

舉報(bào)

0/150
提交
取消

點(diǎn)擊怎么沒(méi)反應(yīng)

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

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

幫助反饋 APP下載

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

公眾號(hào)

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