[removed] get a function's variable's value within another function

前端 未结 5 1472
故里飘歌
故里飘歌 2020-12-08 21:20

okay so I have this code in body:


And this code in script

<         


        
5条回答
  •  甜味超标
    2020-12-08 22:09

    Your nameContent variable is inside the function scope and not visible outside that function so if you want to use the nameContent outside of the function then declare it global inside the

提交回复
热议问题