Passing string parameter in JavaScript function

后端 未结 6 1488
夕颜
夕颜 2021-02-04 10:27

I was trying to pass a string to a JavaScript function.

As it\'s mentioned here - Pass a string parameter in an onclick function

I\'m using this simple co

6条回答
  •  日久生厌
    2021-02-04 11:18

    You can pass string parameters to JavaScript functions like below code:

    I passed three parameters where the third one is a string parameter.

    var btn ="";
    
    // Your JavaScript function
    
    function RoomIsReadyFunc(ID, RefId, YourString)
    {
        alert(ID);
        alert(RefId);
        alert(YourString);
    }
    

提交回复
热议问题