我正在尝试将 javascript 函数参数放入 Spring 消息中,但它失败了。
消息文件条目:
operators.delete.confirm=Are you sure you want to delete {0}?
相关的 javascript 片段:
var msg = '<spring:message code="operators.delete.confirm" arguments="${username}" javaScriptEscape="true"/>';
console.log ( msg );
console.log ( username );
我希望用户名的输出103
是Are you sure you want do delete 103?
,但未使用该参数。控制台日志消息的输出是:
[19:00:14.926] Are you sure you want to delete {0}?
[19:00:14.926] 103
我哪里出错了?