Use JS variable to set the src attribute for [removed] tag

前端 未结 5 673
后悔当初
后悔当初 2020-12-10 10:11

I want to use a javascript variable as a \'src\' attribute for another tag on the same jsp.



        
5条回答
  •  时光取名叫无心
    2020-12-10 10:50

    I use something similar to choice two. There is a slight mistake in your code because "google.com" needs to be surrounded by quotes.

    To improve compatibility, you might want to write it as:

    document.write("
    
                                     
                  
提交回复
热议问题