Verification輸入驗(yàn)證window.onload=function(){varbuttonClick=document.getElementsByTagName('button')[0];varcellPhone=document.getElementsByTagName('input')[0].value;varage=document.getElementsByTagName('input')[1].value;buttonClick.onclick=function(){if(cellPhone==""||isNaN(cellPhone)){alert('請(qǐng)輸入手機(jī)號(hào)碼');}}}手機(jī)號(hào)碼:年齡:提交每次獲取到的input值都是空,手動(dòng)輸入了值也是空,怎么回事呢
js怎么實(shí)時(shí)獲取input的value值
瀟湘沐
2019-05-21 17:42:24