How to use variable in string in jQuery

后端 未结 7 2018
陌清茗
陌清茗 2020-12-08 23:28

I want to use a variable in a string. I have tried to do it many times, but it is only getting the variable name.


    

        
7条回答
  •  一整个雨季
    2020-12-08 23:50

    Javascript does not support expanding variables inside double quotes. Close (and reopen) the quotes and use the + operator, as you already did.

    "

    "

    here id is variable

提交回复
热议问题