所以我有很多像这样的嵌入 html 代码:
<iframe src="http://www.mysite.com/embed/2049340993" frameborder="0" width="608" height="468" scrolling="no"><a href="http://www.mysite.com/view_video.php?viewkey=2049340993">
我想将它们放在不同的变量中,但是我必须像这样转义所有字符:
var embedSource = "<iframe src=\"http://www.mysite.com/embed/2049340993\" frameborder=\"0\" width=\"608\" height=\"468\" scrolling=\"no\"><a href=\"http://www.mysite.com/view_video.php?viewkey=2049340993\">";
有没有更快的方法来实现这一目标?