Html 如何将src插入iFrame的字符串中?

Html 如何将src插入iFrame的字符串中?,html,iframe,Html,Iframe,我想把我的字符串作为src插入这个字符串 String my_scr="http://blabla..." is a variable will be changed fromtime to time 如何将我的\u scr放入下面的字符串中?意味着它应该取代 String frameVideo=“来自YouTube的视频”; 如果我把它放在下面,它不起作用: String frameVideo = "<html><body>Video From YouTu

我想把我的字符串作为src插入这个字符串

    String my_scr="http://blabla..." is a variable will be  changed fromtime to time
如何将我的\u scr放入下面的字符串中?意味着它应该取代

String frameVideo=“来自YouTube的视频
”;
如果我把它放在下面,它不起作用:

String frameVideo = "<html><body>Video From YouTube<br><iframe width=\"420\" height=\"315\" src=\my_scr frameborder=\"0\" allowfullscreen></iframe></body></html>";
String frameVideo=“来自YouTube的视频
”;
您需要打断您的报价,因为
my\u src
是一个变量:

frameVideo = "<html><body>Video From YouTube<br><iframe width=\"420\" height=\"315\" src=\"" + my_scr + "\" frameborder=\"0\" allowfullscreen></iframe></body></html>"
frameVideo=“来自YouTube的视频
frameVideo = "<html><body>Video From YouTube<br><iframe width=\"420\" height=\"315\" src=\"" + my_scr + "\" frameborder=\"0\" allowfullscreen></iframe></body></html>"