在AJAX中嵌入代码错误
embed code in AJAX error
我想用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;
问题是输出是这样的
<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;
相关文章:
- 解析云代码错误:解析.错误{代码:141,消息:“未调用成功/错误”}
- Visual Studio代码错误-未能加载jshint库
- 是我的“;给我发电子邮件”;按钮代码错误
- 按钮创建无法定位功能代码错误
- 双重可乐挑战,JavaScript代码错误
- JavaScript数组,代码错误
- 在 cordova 项目中,我正在使用文件传输插件上传个人资料照片,它总是返回代码 1 错误
- JavaScript 代码错误:图像不显示
- 基本程序的JavaScript代码错误(猜谜游戏)
- IMACROS 将 iim 代码转换为 javascript 后代码错误
- Javascript代码错误
- Javascript简单代码错误
- Perl CGI代码错误
- 这是尝试解析带有时刻的 ASP.NET 日期.js库的错误还是我的代码错误
- JS,PHP,MySQL代码错误用于数学运算
- Parse.com云代码错误:尝试更新用户时未调用success/Error
- Javascript代码错误显示未定义的值
- JavaScript表单验证代码错误
- Adbrite什么都没出现.可能的代码错误
- Jquery代码错误:Undefined不是一个函数