How to put a variable in a link?

Hello guys, i have to send an email on form submission with a link that change.
For example: https://wix.com/mysite/title
Var title = (‘#input’ ).value
The title is a variable. I am not able to put the variable in the link, it never works. Somebody can help me? Thanks