How put a variable in a link

后端 未结 3 993
有刺的猬
有刺的猬 2021-01-29 16:44

i have this link and this variable:

var fin = \"SAT000000002574\";
\"http://sat3.altervista.org/index.php?id=\'+fin\'\"

I don\'t know how i hav

3条回答
  •  梦谈多话
    2021-01-29 17:32

    Interpolation is not standard in javascript. Maybe this can help you http://www.diveintojavascript.com/projects/javascript-sprintf

    Contatination is your best option, but the methods below can also help.

    String.concat();
    
    ["foo", "bar"].join("");
    

提交回复
热议问题