代码是这样的。它是一个函数,它接受两个参数“a”和“b”并将它们进行比较并警告输出。但这对我不起作用!
<script type=”text/javascript”>
function compare(a, b) {
if (a < b) {
alert(“A is less than B”);
} else if (a > b) {
alert(“A is greater than B”);
} else {
alert(“A is equal to B”);
}
}
</script>
JsFiddle 链接:http: //jsfiddle.net/tTCG6/2/
有人可以帮我吗?