如下定义的全局变量var order_type = 0;,然而函数参数也有order_type,这种情况系统不知道取哪个值显示,平时一定要注意,谨记。
<script type="text/javascript">
var order_type = 0;
apiready = function() {
other_first_order_message(6);
}
function other_first_order_message(order_type){
alert(order_type);
}
</script>
转载于:https://www.jianshu.com/p/64b193949150