已采納回答 / weixin_慕前端8193251
?<input type="button" value="改變顏色" onclick="changeColor()"/>??? ? <input type="button" value="改變寬高" onclock="changeWidth()"/>? ? <input type="button" value="隱藏內(nèi)容" onclock="hide()"/>? ? <input type="button" value="顯示內(nèi)容" onclock="show()...
2020-03-04
已采納回答 / langkye
做業(yè)務(wù)的時(shí)候是靈活運(yùn)用的,也就是說(shuō)你的方式二能用;但問(wèn)題是,慕課后臺(tái)處理的方式是要寫(xiě)兩句才能讓你過(guò)而已,跟任務(wù)有關(guān),不用糾結(jié)
已采納回答 / 半生伊
if(score==87){alert("you are right")}else if(score==73){alert ("ok")}
已采納回答 / 牧子謙
<p>是段落標(biāo)簽? 可以這樣設(shè)置document.write("<font color='blue'>開(kāi)啟JS之旅!</font>");
2020-03-01
已采納回答 / langkye
因?yàn)镃ss會(huì)一直影響整個(gè)DOM,除非你用行內(nèi)樣式覆蓋掉原來(lái)的css樣式;你remove掉style是沒(méi)用的,因?yàn)槟莻€(gè)元素沒(méi)有style
2020-02-28
已采納回答 / qq_如冰雖不凍_0
//定義"取消設(shè)置"的函數(shù)<...code...>修改下if語(yǔ)句中style兩邊的的符號(hào),是‘style’,不是
'style'
2020-02-27
已采納回答 / 三大法則
共 四 ?處錯(cuò)誤?? function sethwidthheight(){??????? var b=document.getElementById("txt");??????? e.style.width=100px;??????? e.style.height=100px;?函數(shù)名多了個(gè)h,變量名不統(tǒng)一,b改成e就行了,100px需要加引號(hào)?var c=confirm("你確定要恢復(fù)所有設(shè)置嗎?");??????? if(c==true){??????????? e.removeAttribute(...
2020-02-25
已采納回答 / 慕用1151135
function cancel(){ var c=confirm.("確定恢復(fù)嗎?");? if(c=true)? {? ? ? a.removeAttribute("style");? ? ? b.removeAttribute("style");? }你最后一段代碼有幾個(gè)問(wèn)題var c=confirm.("確定恢復(fù)嗎?");括號(hào)前多了一個(gè)點(diǎn)。? if(c=true)這里應(yīng)該為雙等號(hào) ?if(c==true)? a.removeAttribute("style");這里應(yīng)該為單引號(hào)‘ style’改了之...
2020-02-22