Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在AJAX错误中嵌入代码_Javascript_Ajax_Embed - Fatal编程技术网

Javascript 在AJAX错误中嵌入代码

Javascript 在AJAX错误中嵌入代码,javascript,ajax,embed,Javascript,Ajax,Embed,我试图通过使用AJAX调用嵌入代码来实现嵌入,因为我有很多通道,我不想使用PHP echo 我使用这个代码 embedios="<video x-webkit-airplay=\"allow\"> "; embedios=embedios+"<source src=\""+stream+"\" type=\"video/mp4\"> "; embedios=embedios+"<!-- other sources and fallbacks go here --&g

我试图通过使用AJAX调用嵌入代码来实现嵌入,因为我有很多通道,我不想使用PHP echo

我使用这个代码

embedios="<video x-webkit-airplay=\"allow\"> ";
embedios=embedios+"<source src=\""+stream+"\" type=\"video/mp4\"> ";
embedios=embedios+"<!-- other sources and fallbacks go here --></video> ";
embed=embedios;
embedios=”“;
embedios=embedios+“”;
embedios=embedios+“”;
嵌入=嵌入;
问题是输出结果是这样的

<video x-webkit-airplay="allow" tabindex="0">
<source type="video/mp4" src="http://yoursn0w.com/ch3.m3u8 "></source>
<!-- other sources and fallbacks go here -->
</video>
<video x-webkit-airplay="allow"> 
  <source src="http://yoursn0w.com/ch3.m3u8" type="video/mp4"> 
  <!-- other sources and fallbacks go here --> 
</video>

但我希望它能像这样出现

<video x-webkit-airplay="allow" tabindex="0">
<source type="video/mp4" src="http://yoursn0w.com/ch3.m3u8 "></source>
<!-- other sources and fallbacks go here -->
</video>
<video x-webkit-airplay="allow"> 
  <source src="http://yoursn0w.com/ch3.m3u8" type="video/mp4"> 
  <!-- other sources and fallbacks go here --> 
</video>


我不知道我在这段代码中做错了什么

您的引用不正确

embedios="<video x-webkit-airplay=\"allow\"> ";
embedios=embedios+"<source src=\""+stream+"\" type=\"video/mp4\"> ";
embedios=embedios+"<!-- other sources and fallbacks go here --></video> ";
embed=embedios;
var embedios='<video x-webkit-airplay=\"allow\">'
embedios=embedios+'<source src=\""+stream+"\" type=\"video/mp4\">'
embedios=embedios+'<!-- other sources and fallbacks go here --></video>'
embed=embedios;
var embedios=''
embedios=embedios+“”
embedios=embedios+“”
嵌入=嵌入;

您没有终止字符串:

embedios="<video x-webkit-airplay=\"allow\">"
embedios=embedios+"<source src=\""+stream+"\" type=\"video/mp4\">"
embedios=embedios+"<!-- other sources and fallbacks go here --></video>"
embed=embedios;
embedios=“”
embedios=embedios+“”
embedios=embedios+“”
嵌入=嵌入;

您能更详细地回答您的问题吗?您在做什么?什么是流等等。对不起,我编辑了上面的代码。我尝试了您的代码,您的输出如下:在这里输入代码您应该可以在视频标签中输入代码,但请删除
px
。所以宽度=\“635\”高度=\“448\”对不起,我只是想视频标签应该在airplay线上,而不是soruce线上^^“所以现在一切正常:D