How to insert *JavaScript* variable to *thymeleaf* URL?

*example*:

```
var i = x;
var actionCheck = /*[[@{/page/page1?action=add&amp;param2=i}]]*/ '/memberrki/checkCardNum?action=add&amp;param2=i}';

```

`param2` must be filled from `var i` ?

This is what I expected:

```
/memberrki/checkCardNum?action=add&param2=x

```