0
下面的腳本不起作用時,在博客帖子中使用它..任何幫助?腳本不能在博客工作
var popvid = null;
function popWin(divId) {
if(typeof(divId) == 'string') {
divId = document.getElementById(divId);
}
if(!popvid || popvid.closed) {
popvid = window.open('', 'vidplayer', 'top=200,left=390,width=450,height=375,status=no');
}
popvid.document.body.style.backgroundColor = 'black';
popvid.focus();
popvid.document.body.innerHTML = '<BR><center>' + divId.innerHTML + '</center>';
return false;
}
window.onunload = function() {
if(popvid) {
popvid.close();
}
}
其次:
<div id='popvid1' style='display: none'>
<embed style="width:426px; height:320px;" id="VideoPlayback"
type="application/x-shockwave-flash"
src="http://www.antenna.gr/webtv/images/fbplayer.swf?cid=07_f_y_mfa_y$_a_e=&volx=100&iu=1&telemetry=false" allowFullScreen="true" allowScriptAccess="sameDomain" flashvars="controls=true"></embed>
</div>
<div id='popvid2' style='display: none'>
<embed style="width:426px; height:320px;" type="application/x-shockwave-flash" src="http://www.antenna.gr/webtv/images/fbplayer.swf?cid=y_n_y_prr6pd_sc=&volx=100&iu=1&telemetry=false" allowFullScreen="true" allowScriptAccess="sameDomain" flashvars="controls=true"> </embed>
</div>
<button href="#" onclick="return popWin('popvid1');" class=popup>01</button>
<button href="#" onclick="return popWin('popvid2');" class=popup>02</button>
**不要**使用「報價」格式化代碼。改爲使用「代碼」格式。 – ThiefMaster
ThiefMaster你能更具體嗎? – Saint21
http://stackoverflow.com/editing-help#code - 你的問題的初始格式是[非常糟糕](http://stackoverflow.com/revisions/14012109/1) – ThiefMaster