我有这个代码而且这不起作用
<script>
dialogFun();
function dialogFun(){
var code="<div style='font-size: 12px' id='dialog'><script src='https://content.jwplatform.com/libraries/xyz.js'> </script><div id='jwplyr'>Loading the player...</div><script type='text/javascript'>jwplayer('jwplyr').setup({'file': 'http://content.jwplatform.com/videos/xyz-lusPHdHK.mp4','image':'http://content.jwplatform.com/thumbs/xyz-320.jpg'});</script></div>";
console.log(code);
$( "body" ).append( code );
}
</script>
这不起作用
答案 0 :(得分:4)
ESCAPE&#34; /&#34;关闭标签
<script>
dialogFun();
function dialogFun(){
var code = "<div style='font-size: 12px' id='dialog'>"+
"<script src='https://content.jwplatform.com/libraries/xyz.js'><\/script>"+
"<div id='jwplyr'>Loading the player...</div>"+
"<script type='text/javascript'>jwplayer('jwplyr').setup({'file': 'http://content.jwplatform.com/videos/xyz-lusPHdHK.mp4','image':'http://content.jwplatform.com/thumbs/xyz-320.jpg'});<\/script><\/div>";
console.log(code);
$( "body" ).append( code );
}
</script>