我想在爲用戶發佈視頻之前爲我的視頻獲取預覽系統,因爲我需要能夠從數據庫檢索多個文件並相應地創建視頻。我有一個按鈕變量在JS中傳遞的問題,視頻幻燈片
<a class="btnGray clickable floatRight" style="position:relative;" onclick="startVideo('<?=$content[ReleaseSystem::contentID]?>','<?=$video['filename']?>');"><?=$lang[109]?></a>
此按鈕鏈接到下面的函數
現在奇怪的是,視頻播放器加載時我沒有穿過我的按鈕,鏈接,但是當我嘗試發送一個鏈接整個功能分解。我不知道爲什麼會發生。
也在這裏是玩家
<div id="videoFlyout<?=$content[ReleaseSystem::contentID]?>" class="popUpWrapper" style="display:none;position:absolute;top:10px;left:auto;">
<div class="firstPopupDiv" style="left:center;height:425px;width:620px;">
<div class="popupDivInner" style="display:block;" class="hideSteps">
<div id="<?=$content[ReleaseSystem::contentID]?>">
<center><a id="player" style="display:block; height:365px; width:620px;"></a></center>
</div>
<a class="btnRed clickable floatRight" style="position:relative;" onclick="closeVideo(<?=$content[ReleaseSystem::contentID]?>);"><?=$lang[109]?></a>
<a class="btnGray clickable floatRight" style="position:relative;" onclick="startVideo('<?=$content[ReleaseSystem::contentID]?>','<?=$video['filename']?>');"><?=$lang[109]?></a>
</div>
</div>
</div>
這裏我的HTML代碼是我的渲染HTM
<div id="videoFlyout280" class="popUpWrapper" style="position: absolute; top: 10px; left: auto; display: none;">
<div class="firstPopupDiv" style="left:center;height:425px;width:620px;">
<div class="popupDivInner" style="display:block;">
<div id="280" style="">
<center>
<a id="player" style="display:block; height:365px; width:620px;">
<object id="player_api" width="100%" height="100%" type="application/x-shockwave-flash" data="players/nobranding.swf">
<param value="true" name="allowfullscreen">
<param value="always" name="allowscriptaccess">
<param value="high" name="quality">
<param value="false" name="cachebusting">
<param value="#000000" name="bgcolor">
<param value="opaque" name="wmode">
<param value="config={"clip":{"autoPlay":true},"playlist":[{"url":"videos/IMPORTS/video_1011_281_1337198589_VID_20120511_00000.3GP","autoPlay":true}],"plugins":{"controls":{"playlist":true}},"playerId":"player"}" name="flashvars">
</object>
</a>
</center>
</div>
<a class="btnRed clickable floatRight" onclick="closeVideo(280);" style="position:relative;">Cancel</a>
<a class="btnGray clickable floatRight" onclick="startVideo('280','video_1011_280_1337183112_testCat.mp4');" style="position:relative;">Cancel</a>
</div>
</div>
</div>
<div id="videoFlyout281" class="popUpWrapper" style="position: absolute; top: 10px; left: auto;">
<div class="firstPopupDiv" style="left:center;height:425px;width:620px;">
<div class="popupDivInner" style="display:block;">
<div id="281" style="">
<center>
<a id="player" style="display:block; height:365px; width:620px;"> </a>
</center>
</div>
<a class="btnRed clickable floatRight" onclick="closeVideo(281);" style="position:relative;">Cancel</a>
<a class="btnGray clickable floatRight" onclick="startVideo('281','video_1011_281_1337198589_VID_20120511_00000.3GP');" style="position:relative;">Cancel</a>
</div>
</div>
</div>
注意:也許重新考慮使用[PHP的短標籤](http://stackoverflow.com/a/200666/633656),一定要閱讀所有的評論,因爲它不是一個簡單的答案,只是「把它變成」。更多關於「關閉,如果...」 – Recognizer