亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

運行不了 之前可以運行的 現在按鈕點了沒反應

//定義"改變顏色"的函數

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

? ? function col(){

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

? ? }


//定義"改變寬高"的函數

? ? function wh(){

? ? txt.style.width="300px";

? ? txt.style.height="50px";

? ? }


//定義"隱藏內容"的函數

? ? function no(){

? ? txt.style.display="none"

? ? }


//定義"顯示內容"的函數

? ? function bl(){

? ? txt.style.display="block"

? ? }


//定義"取消設置"的函數

? ? function qx(){

? ? var ra=confirm("是否取消設置")

? ? if ra==true

? ? {

? ? ray.removeAttribute('style');

? ? }

? ? }

? ?

? </script>


正在回答

2 回答

function內的txt要換成ray

0 回復 有任何疑惑可以回復我~

?if ra==true{

?????ray.removeAttribute('style');

}

這里應該改成:

?if (ra==true){

?????ray.removeAttribute('style');

}

按鈕之所以點不了,應該是沒有在

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

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

? ? <input type="button" value="隱藏內容" onclick="HideContent()">

? ? <input type="button" value="顯示內容" onclick="ShowContent()">

? ? <input type="button" value="取消設置" onclick="CancelSet()">

按鈕欄添加對應的響應函數導致的

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

運行不了 之前可以運行的 現在按鈕點了沒反應

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號