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

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

怎么點(diǎn)擊沒效果顯示

<!DOCTYPE?HTML>
<html>??
<head>??
<meta?http-equiv="Content-Type"?content="text/html;?charset=UTF-8"?/>??
<title>JavaScript</title>??
</head>??
<body>??
????
????????<form?name="Input">
????????????<table?align="center"?width="500px"?height="50%"?border="1">
????????????????<tr>
????????????????????<td?align="center"?width="100px">
????????????????????????學(xué)號:
????????????????????</td>
????????????????????<td?align="center"?width="300px">
????????????????????????<input?type="text"?id=userid?name="user"?onblur="validate();">
????????????????????????<div?id=usermsg></div>
????????????????????</td>
????????????????</tr>
????????????????<tr>
????????????????????<td?align="center"?width="100px">
????????????????????????姓名:
????????????????????</td>
????????????????????????<td?align="center">
????????????????????????<input?type="text"?name="name">
????????????????????</td>
????????????????</tr>
????????????????<tr>
????????????????????<td?align="center"?width="%45">
????????????????????????性別:
????????????????????</td>
????????????????????<td?align="center">
????????????????????????<input?type="radio"?name="sex"?value="男">
????????????????????????男
????????????????????????<input?type="radio"?name="sex"?value="女">
????????????????????????女
????????????????????</td>
????????????????</tr>
????????????????<tr>
????????????????????<td?align="center"?width="30%">
????????????????????????年齡:
????????????????????</td>
????????????????????<td?align="center"?width="300px">
????????????????????????<input?type="text"?name="age">
????????????????????</td>
????????????????</tr>
????????????????<tr>
????????????????????<td?align="center"?width="100px">
????????????????????????地址:
????????????????????</td>
????????????????????<td?align="center"?width="300px">
????????????????????????<input?type="text"?name="addr">
????????????????????</td>
????????????????</tr>

????????????</table>
????????</form>
????????<h1?id="myHead"?onclick="getValue()">
????????????看看三種獲取節(jié)點(diǎn)的方法?
????????</h1>
????????<p>
????????????點(diǎn)擊標(biāo)題彈出它的值。
????????</p>
????????<input?type="button"?onclick="getElements()"
????????????value="看看name為sex的節(jié)點(diǎn)有幾個?"?/>
????????<Br>
????????<input?type="button"?onclick="getTagElements()"
????????????value="看看標(biāo)簽名為input的節(jié)點(diǎn)有幾個?"?/>
????????????
?????<script?type="text/javascript">
?????????function?getValue()
??????????{
??????????????vat?myH?=?document.getElementById("myHead");
??????????????alert(myH.innerHTML);
??????????}
??????????function?getElements()
??????????{
?????????????var?myS??=?document.getElementsByName("sex");
??????????????alert(myS.length);
??????????}

??????????function?getTagElements()
??????????{
??????????????var?myI??=?document.getElementsByTagName("input");
??????????????alert(myI.length);
??????????}
?????????
?????</script>????????

????</body>
</html>

代碼應(yīng)該沒錯呀,怎么最后點(diǎn)擊頁面的按鈕都沒反應(yīng)

正在回答

1 回答

注意看你的73行代碼??vat?myH?=?document.getElementById("myHead");

出錯原因:var你寫成來vat,

你修改成var myH?=?document.getElementById("myHead");

代碼成功運(yùn)行。

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

蒲蒲森 提問者

居然沒發(fā)現(xiàn)這里錯了!非常感謝!
2017-08-21 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

怎么點(diǎn)擊沒效果顯示

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

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

幫助反饋 APP下載

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

公眾號

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