嗨,我在拆分它以在我的 java 脚本中使用它之后放置值时出错,而如果我给它提供不需要拆分的值,那么它运行良好我需要拆分的值是
option value="intro.wmv,1"
当我给它简单的介绍 .wmv 值并相应地在脚本中获取它时,它运行良好,而在上述情况下它给了我错误?我的脚本如下所示,它在点击时起作用,也就是说,
function PlayIt(){
var s = "'+document.getElementById('cancion').value+'";
var str_array = s.split(',');
document.getElementById("music1").innerHTML='<object id="mediaPlayer" width="470" height="400" '
+'classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" '
+'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" '
+'standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">'
+'<param name="fileName" value="'+str_array[0].value+'">'
+'<param name="animationatStart" value="true">'
+'<param name="transparentatStart" value="true">'
+'<param name="autoStart" value="1">'
+'<param name="showControls" value="true">'
+'<param name="loop" value="true">'
+'<param name="ShowStatusBar" value="true">'
+'<param name="ShowPositionControls" value="true">'
+'<param name="enableContextMenu" value="1" />'
+'<param name="fullScreen" value="0" />'
+'<embed type="application/x-mplayer2" '
+'pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" '
+'bgcolor="darkblue" showcontrols="true" showpositioncontrols="true" showstatusbar="true" showgotobar="true" width="470" height="400" '
+'src="'+str_array[0].value+'" autostart="true" designtimesp="5311" loop="true">'
+'</embed>'
+'</object>'
}
希望得到你的答复
提前致谢