最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

麻煩哪位大神幫我看看,為什么表單驗(yàn)證時(shí)點(diǎn)擊驗(yàn)證按鈕沒(méi)有任何顯示呢,而且輸入框也會(huì)自動(dòng)清空

麻煩哪位大神幫我看看,為什么表單驗(yàn)證時(shí)點(diǎn)擊驗(yàn)證按鈕沒(méi)有任何顯示呢,而且輸入框也會(huì)自動(dòng)清空

朝夕ing 2017-02-25 18:20:17
<!doctype?html> <html> <head> ????<meta?charset="utf-8"> ????<title>表單驗(yàn)證1</title> ????<style> ????????span?{ ????????????font-size:?20px; ????????????font-family:?"微軟雅黑"; ????????????font-weight:?bold; ????????} ????????#input-text?{ ????????????margin:?0?10px; ????????????width:?500px; ????????????height:?50px; ????????????line-height:?60px; ????????????border-radius:?10px; ????????????outline:?0; ????????????border:?1px?solid?#999999; ????????} ????????#alert?{ ????????????width:?200px; ????????????height:?30px; ????????????padding-left:?50px; ????????} ????????#input-submit?{ ????????????background-color:?#2F79BA; ????????????color:?white; ????????????font-weight:?bold; ????????????font-size:?18px; ????????????width:?95px; ????????????height:?60px; ????????????line-height:?60px; ????????????border:?0; ????????????border-radius:?10px; ????????????outline:?0; ????????} ????</style> ????<script?type="text/javascript"> ????????window.onload?=?function?()?{ ????????????var?re?=?/[\u4e00-\u9fa5a-zA-Z0-9\-]{3,15}/g; ????????????var?oBtn?=?document.getElementById('input-submit'); ????????????var?oInput?=?document.getElementById('input-text'); ????????????var?ale?=?document.getElementById('alert'); ????????????oInput.onfocus?=?function?()?{ ????????????????ale.innerHTML?=?"必填,長(zhǎng)度為4到16個(gè)字符"; ????????????} ????????????function?show()?{ ????????????????if?(?oInput.value?==?"")?{ ????????????????????ale.innerHTML?=?"姓名不能為空"; ????????????????} ????????????????else?if?(re.test(oInput.value)?==?True)?{ ????????????????????ale.innerHTML?=?"名稱格式正確"; ????????????????} ????????????} ????????} ????</script> </head> <body> <form?method="post"> ????<label><span>名稱</span> ????????<input?type="text"?name="myName"?id="input-text"></label> ????<input?type="submit"?value="驗(yàn)證"?id="input-submit"?onclick="show()"> ????<div?id="alert"?></div> </form> </body> </html>
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 1439 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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