请问javascript var a={} 是什么意思
http://topic.csdn.net/t/20050804/12/4188387.html
答:自定义对象
var zyPlayer={
_flag:0,
width:600,
height:400,
_wnd:null,
//判断浏览器以及有无安装控件
_check:function() {
var w3c=(document.getElementById)? true: false;
var agt=navigator.userAgent.toLowerCase();
var ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") ==
-1) && (agt.indexOf("omniweb") == -1));
if (!ie) {
alert("web在线播放页面仅支持IE!");
return;
}
try {
new ActiveXObject("PIPIWEBPLAYER.PIPIWebPlayerCtrl.1");
zyPlayer._flag=1;
} catch(e) {}
},
_init:function() {
zyPlayer._check();
if (zyPlayer._flag==0) {
zyPlayer.notInstall();
} else {
zyPlayer._createActivex();
}
},
//没安装控件的情况下
notInstall:function() {
/*if (confirm("为了更流畅地观看高清电影,推荐您下载安装皮皮影音。\n\n现在下载安装皮皮影音?")) {
document.location="http://dl.pipi.la/pipiyy.exe";
} else {
alert("对不起,假如您没有安装皮皮影音,就无法观看本网站提供的影片。");
}*/
var _t="<iframe scrolling='no' frameborder='0' style='margin:0;
width:"+zyPlayer.width+"px; height:"+zyPlayer.height+"px' src='http://www.pipi.la/install/install.html'></iframe>";
document.write(_t);
},
_createActivex:function() {
var _str='<OBJECT style="WIDTH:'+zyPlayer.width+'px;
HEIGHT:'+zyPlayer.height+'px" id=pipiwebplayer_control classid=clsid:A74BF134-5213-46B5-AF36-CE1888315DC7></OBJECT>';
document.write(_str);
},
play:function(_movUrl,_zzid) {
zyPlayer._init();
if (zyPlayer._flag==1) {
zyPlayer._getWnd(_movUrl,_zzid);
}
},
_getWnd:function(_movUrl,_zzid) {
if (!pipiwebplayer_control.strWebPlayerWndHandle || (pipiwebplayer_control.strWebPlayerWndHandle+"")=="")
{
window.setTimeout(function() {zyPlayer._getWnd(_movUrl,_zzid);},1000);
} else {
zyPlayer._wnd=pipiwebplayer_control.strWebPlayerWndHandle;
zyPlayer._play(_movUrl,_zzid);
}
},
_play:function(_movUrl,_zzid) {
var _temp=_movUrl.split('|');
var _t=[];
_t.push(_temp[0]);
_t.push("for/chromebug");
_t.push("zzid="+_zzid);
if (zyPlayer._wnd!=null)
_t.push("wnd="+zyPlayer._wnd);
_t.push(_temp[1]);
_movUrl=_t.join('|');
document.location=_movUrl;
}
}
var player=zyPlayer;
<script type="text/javascript" src="http://www.pipi.la/webplay/pipi.js"></script>
<script type="text/javascript">
player.width=500;
player.height=500;
player.play('ppfilm://cmd=stream|info=oPSVkYVdImgIOIoDhJa.8TIdb1WC0Eqtbk4kT.Vdu6LTq/uygGBy/p0YM0z5fagXcOQAzQZRI1X3FgtOSxUlKeDBtUkKEHxIdFOqL7ejkdZtKk5f/r863g9LVjXLeIicgceOnbFdRvaKCTsU9LB975Ue9zONU6y6Dtn4vcnM3ub8oNfM2Q8mG3ZOmwbxhds=',1);
</script>