js奇偶数判断的代码

(编辑:jimmy 日期: 2024/10/14 浏览:2)

有两个变量 a 和 b 
如果a=1,3,5,7,9 则b="奇数"
如果a=2,4,6,8  则b="偶数"
如果a="0" 则b="零"

[Ctrl+A 全选 注:引入外部Js需再刷新一下页面才能执行]