var age=prompt("请输入您的年龄:"); age=parseInt(age); var a=isNaN(age); a==true?alert("你输入的年龄有误,请重新输入"):alert(age); var psd1=prompt("请输入您的密码"); var psd2=prompt("请您再次输入您的密码"); psd1==psd2?alert("请进行下一步"):alert("您两次输入的密码不一致,请重新输入");
新手寻求关注,谢谢