艾露莎VS焰灵姬
2019-04-18 20:19
<script>
var apples=12;
var kids=3;
var msg=(apples> and apples % kids==0)?"可以均分":"不能均分";
document.write(msg);
</script>
12345678 <script> var apples=12; var kids=3; if((apples >= kids) && (apples % kids == 0)) {document.write("可以均分")} else {document.write("不能均分")}</script>
<script> var apples=12; var kids=3; if((apples >= kids) && (apples % kids == 0)) {document.write("可以均分")} else {document.write("不能均分")} </script>
第四行的and换成&&
JavaScript入门篇
739817 学习 · 9566 问题
相似问题