Passing string parameter in JavaScript function

后端 未结 6 1485
夕颜
夕颜 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:01

    document.write(``)
    

    Better to use `` than "". This is a more dynamic answer.

提交回复
热议问题