How to append a string value during assignment in Javascript?

前端 未结 7 1066
故里飘歌
故里飘歌 2020-12-10 08:04

Hey i dont know if that is possible but i want to set a given variable in js by reference.

What i want to do is, that each time i pass a string to t

相关标签:
7条回答
  • 2020-12-10 09:00

    If its a reference to an input text filed then you can use the value property

    function addstring(string)
    {
        document.getElementById("string").value += string.value;
    
    }
    

    See value

    0 讨论(0)
提交回复
热议问题