当JS中function方法参数出现字符串时(不是纯数字)进行click事件,后台不会得到参数值。会出现下面的错误。
onclick="withDrawDetails(${batchWithDraw.merchId},${batchWithDraw.orderId}
解决方案:
onclick="withDrawDetails('${batchWithDraw.merchId}','${batchWithDraw.orderId}')
参数加上引号。就可以实现字符串的传递。
当JS中function方法参数出现字符串时(不是纯数字)进行click事件,后台不会得到参数值。会出现下面的错误。
onclick="withDrawDetails(${batchWithDraw.merchId},${batchWithDraw.orderId}
解决方案:
onclick="withDrawDetails('${batchWithDraw.merchId}','${batchWithDraw.orderId}')
参数加上引号。就可以实现字符串的传递。