function myfun(){
//var yofad = document.getElementById('age').value;
var yoad;
var year = 2014 ;
if( year >= 2014){
yoad = "Your certicate is ready go to school portal";
} else if (year == 2019){
yoad = "Your certificate is in progress";
} else {
yoad = "cert not found";
}
document.getElementById('cc').innerHTML=yoad
}
<h6>Enter your year of admission to know if your certificate is ready</h6>
<input id="age">
<button onclick="myfun()">enter</button>
<p id="xc"></p>
<p id="cc"></p>
当输入介于 2014 和 2019 之间时,我希望输出为“您的证书已准备好去学校门户网站”,当输入高于 2019 时,输出应为 cert is not read
江户川乱折腾
慕丝7291255
桃花长相依
相关分类