我用alert替换eval后得到如下数据,请问下面的\x \u如何处理?谢谢。var $$=function(value){return document.getElementById(value)};var killErrors=function(value){return true};window.onerror=null;window.onerror=killErrors;var Player={'\x50\x61\x72\x65\x6e\x74\x55\x72\x6c':document.URL,'\x50\x61\x72\x65\x6e\x74\x53\x65\x72\x76\x65\x72\x4e\x61\x6d\x65':server_name.split("\x24\x24\x24"),'\x50\x61\x72\x65\x6e\x74\x50\x6c\x61\x79\x65\x72\x4e\x61\x6d\x65':player_name.split("\x24\x24\x24"),'\x55\x72\x6c\x6c\x69\x73\x74':decodeURIComponent(url_list).split("\x24\x24\x24"),'\x49\x64':'','\x53\x69\x64':'','\x50\x69\x64':'','\x55\x72\x6c':'','\x4e\x65\x78\x74\x55\x72\x6c':'','\x55\x72\x6c\x4e\x61\x6d\x65':'','\x55\x72\x6c\x4e\x65\x78\x74\x4e\x61\x6d\x65':'','\x53\x65\x72\x76\x65\x72\x55\x72\x6c':'','\x53\x65\x72\x76\x65\x72\x4e\x61\x6d\x65':'','\x50\x6c\x61\x79\x65\x72\x4e\x61\x6d\x65':'','\x4c\x61\x73\x74\x57\x65\x62\x50\x61\x67\x65':'','\x4e\x65\x78\x74\x57\x65\x62\x50\x61\x67\x65':'','\x52\x6f\x6f\x74':ff_root,'\x42\x75\x66\x66\x65\x72':ff_buffer,'\x50\x61\x73\x65':ff_buffer,'\x57\x69\x64\x74\x68':ff_width,'\x48\x65\x69\x67\x68\x74':ff_height,'\x53\x65\x63\x6f\x6e\x64':ff_second,'\x44\x6f\x77\x6e\x5f\x47\x76\x6f\x64':'\x68\x74\x74\x70\x3a\x2f\x2f\x75\x6e\x69\x6f\x6e\x2e\x66\x66\x38\x34\x2e\x63\x6f\x6d\x2f\x66\x66\x32\x30\x2f\x67\x76\x6f\x64\x2e\x68\x74\x6d\x6c\x23\x23\x23'+ff_gvod+'\x23\x23\x23\x70\x70\x76\x6f\x64','\x53\x68\x6f\x77':function(){if(ff_showlist==1){var list_show='\x62\x6c\x6f\x63\x6b'}else{var list_show='\x6e\x6f\x6e\x65'};if(this.NextWebPage){var NextWebPage=this.NextWebPage}else{var NextWebPage=this.ParentUrl};$$('\x74\x6f\x70\x6c\x65\x66\x74').innerHTML='\x3c\x61\x20\x68\x72\x65\x66\x3d\x22'+this.LastWebPage+'\x22\x3e\u4e0a\u4e00\u96c6\x3c\x2f\x61\x3e\x20\x3c\x61\x20\x68\x72\x65\x66\x3d\x22'+NextWebPage+'\x22\x3e\u4e0b\u4e00\u96c6\x3c\x2f\x61\x3e';$$('\x74\x6f\x70\x63\x63').innerHTML='\x3c\x64\x69\x76\x20\x69\x64\x3d\x22\x70\x6c\x61\x79\x70\x70\x76\x6f\x64\x22\x20\x73\x74\x79\x6c\x65\x3d\x22\x68\x65\x69\x67\x68\x74\x3a\x32\x36\x70\x78\x3b\x6c\x69\x6e\x65\x2d\x68\x65\x69\x67\x68\x74\x3a\x32\x36\x70\x78\x3b\x6f\x76\x65\x72\x66\x6c\x6f\x77\x3a\x68\x69\x64\x64\x65\x6e\x22\x3e\u6b63\u5728\u64ad\u653e\uff1a'+list_name+'\x20'+vod_name+'\x20'+this.UrlName+'\x3c\x2f\x64\x69\x76\x3e';$$('\x74\x6f\x70\x72\x69\x67\x68\x74').innerHTML='\x3c\x61\x20\x68\x72\x65\x66\x3d\x22\x6a\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3a\x76\x6f\x69\x64\x28\x30\x29\x22\x20\x6f\x6e\x43\x6c\x69\x63\x6b\x3d\x22\x50\x6c\x61\x79\x65\x72\x2e\x53\x68\x6f\x77\x4c\x69\x73\x74\x28\x29\x3b\x22\x3e\u5f00\u542f\x2f\u5173\u95ed\u5217\u8868\x3c\x2f\x61\x3e';$$('\x70\x6c\x61\x79\x6c\x65\x66\x74').innerHTML='\x3c\x69\x66\x72\x61\x6d\x65\x20\x73\x72\x63\x3d\x22'+this.Buffer+'\x22\x20\x69\x64\x3d\x22\x62\x75\x66\x66\x65\x72\x22\x20\x6e\x61\x6d\x65\x3d\x22\x62\x75\x66\x66\x65\x72\x22\x20\x77\x69\x64\x74\x68\x3d\x22\x31\x30\x30\x25\x22\x20\x68\x65\x69\x67\x68\x74\x3d\x22'+this.Height+'\x22\x20\x73\x63\x72\x6f\x6c\x6c\x69\x6e\x67\x3d\x22\x6e\x6f\x22\x20\x66\x72\x61\x6d\x65\x62\x6f\x72\x64\x65\x72\x3d\x22\x30\x22\x20\x73\x74\x79\x6c\x65\x3d\x22\x64\x69\x73\x70\x6c\x61\x79\x3a\x6e\x6f\x6e\x65\x3b\x70\x6f\x73\x69\x74\x69\x6f\x6e\x3a\x61\x62\x73\x6f\x6c\x75\x74\x65\x3b\x7a\x2d\x69\x6e\x64\x65\x78\x3a\x39\x3b\x22\x3e\x3c\x2f\x69\x66\x72\x61\x6d\x65\x3e'+$Showhtml();$$('\x70\x6c\x61\x79\x72\x69\x67\x68\x74').style.height=this.Height+'\x70\x78';$$('\x70\x6c\x61\x79\x72\x69\x67\x68\x74').innerHTML='\x3c\x64\x69\x76\x20\x69\x64\x3d\x22\x6c\x69\x73\x74\x22\x20\x73\x74\x79\x6c\x65\x3d\x22\x64\x69\x73\x70\x6c\x61\x79\x3a'+list_show+'\x3b\x68\x65\x69\x67\x68\x74\x3a'+this.Height+'\x70\x78\x22\x3e'+this.CreateList()+'\x3c\x2f\x64\x69\x76\x3e';document.write('\x3c\x73\x63\x72'+'\x69\x70\x74\x20\x73\x72\x63\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x75\x6e\x69\x6f\x6e\x2e\x66\x66\x38\x34\x2e\x63\x6f\x6d\x2f\x66\x66\x32\x30\x2f\x74\x6f\x70\x2e\x6a\x73\x22\x20\x74\x79\x70\x65\x3d\x22\x74\x65\x78\x74\x2f\x6a\x61\x76\x61\x73\x63\x72\x69\x70\x74\x22\x3e\x3c\x2f\x73\x63\x72'+'\x69\x70\x74\x3e')},'\x42\x75\x66\x66\x65\x72\x48\x69\x64\x65':function(){$$("\x62\x75\x66\x66\x65\x72").style.display="\x6e\x6f\x6e\x65"},'\x43\x72\x65\x61\x74\x65\x4c\x69\x73\x74':function(){var count_play=this.ParentPlayerName.length;var html='';for(var i=0;i<count_play;i++){if(this.Sid==i){ul_display='\x64\x69\x73\x70\x6c\x61\x79\x3a\x62\x6c\x6f\x63\x6b';h2class='\x68\x32\x5f\x6f\x6e'}else{ul_display='\x64\x69\x73\x70\x6c\x61\x79\x3a\x6e\x6f\x6e\x65';h2class='\x68\x32'};var count_urls=this.Urllist[i].split("\x2b\x2b\x2b");var sid_on;var sub_on;var html_sub;html_sub='\x3c\x64\x69\x76\x20\x73\x74\x79\x6c\x65\x3d\x22'+ul_display+'\x22\x20\x69\x64\x3d\x22\x73\x75\x62'+i+'\x22\x3e';for(var j=0;j<count_urls.length;j++){var href=this.ParentUrl.replace('\x73\x69\x64\x2d'+this.Sid+'\x2d\x70\x69\x64\x2d'+this.Pid,'\x73\x69\x64\x2d'+i+'\x2d\x70\x69\x64\x2d'+(j+1)).replace(this.Id+'\x2d'+this.Sid+'\x2d'+this.Pid,this.Id+'\x2d'+i+'\x2d'+(j+1));if(this.Sid==i&&this.Pid==(j+1)){var li_on='\x20\x63\x6c\x61\x73\x73\x3d\x22\x6c\x69\x73\x74\x5f\x6f\x6e\x22'}else{li_on=''};html_sub+='\x3c\x73\x70\x61\x6e\x3e\x3c\x61\x20\x68\x72\x65\x66\x3d\x22'+href+'\x22\x20\x74\x69\x74\x6c\x65\x3d\x22'+count_urls[j].split("\x2b\x2b")[0]+'\x22\x20'+li_on+'\x3e'+count_urls[j].split("\x2b\x2b")[0]+'\x3c\x2f\x61\x3e\x3c\x2f\x73\x70\x61\x6e\x3e'};html_sub+='\x3c\x2f\x64\x69\x76\x3e';html+='\x3c\x64\x69\x76\x20\x69\x64\x3d\x22\x6d\x61\x69\x6e'+i+'\x22\x20\x63\x6c\x61\x73\x73\x3d\x22'+h2class+'\x22\x3e';html+='\x3c\x68\x32\x20\x6f\x6e\x63\x6c\x69\x63\x6b\x3d\x22\x50\x6c\x61\x79\x65\x72\x2e\x54\x61\x62\x73\x28'+i+'\x2c'+
解决方案 »
- 怎样用JS 实现直接打印 而不弹出提示对话框?
- jquery自定义动画
- 如何用js创建 table对象
- foo.abc;foo.prototype.abc;区别
- 求教:Html 5 中canvas.toDataURL方法报SecurityError错误 ,怎么解决 ??
- 如何通过设置CSS,让表格居中?
- 百分求 IE提示页面变慢 的解决方法
- 如何在网页中开启记事本?
- WdatePicker readyOnly 为 false时 键盘删除文本框为空时怎么校验
- 如何获取jquery easyui 中combobox选中的值呢?
- jquery指定table某tr下动态添加tr
- extjs3.4如何使 EditorGridPanel生成的单元格点击可以生成一个自定义的文件上传框?
(count_play-1)+')">>>'+eval('play_'+this.ParentPlayerName[i])+'</h2>';html+=html_sub;html+='</div>'};return html},'ShowList':function(){if($$('list').style.display=="none"){$$('list').style.display="block"}else{$$('list').style.display="none"}},'Tabs':function(no,n){var subdisply=$$('sub'+no).style.display;for(var i=0;i<=n;i++){$$('main'+i).className='h2';$$('sub'+i).style.display='none'};$$('main'+no).className='h2_on';if(subdisply=='none'){$$('sub'+no).style.display='block'}else{$$('sub'+no).style.display='none'}},'Install':function(){var downurl=eval('ff_'+this.PlayerName);$$("install").innerHTML='<iframe border="0" src="http://union.ff84.com/install/'+this.PlayerName+'.html?u='+downurl+'&v=20120224" marginWidth="0" frameSpacing="0" marginHeight="0" frameBorder="0" noResize scrolling="no" width="100%" height="'+this.Height+'" vspale="0"></iframe>';$$('install').style.display='block'},'Html':function(){document.write('<div class="FF"><table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="2"><table><tr><td width="100" id="topleft"></td><td id="topcc"></td><td width="100" id="topright"></td></tr></table></td></tr><tr><td colspan="2" id="install" style="display:none"></td></tr><tr><td id="playleft" valign="top"> </td><td id="playright" valign="top"> </td></tr></table></div>')},'Play':function(){this.Html();var URL=this.ParentUrl.match(/4+.*/g)[0].match(/4+/g);var Count=URL.length;this.Id=URL[(Count-3)]*1;this.Sid=URL[(Count-2)]*1;this.Pid=URL[(Count-1)]*1;this.ServerName=this.ParentServerName[this.Sid];this.PlayerName=this.ParentPlayerName[this.Sid];if(this.ServerName){this.ServerUrl=eval('ff_'+this.ServerName)};var UrlArr=this.Urllist[this.Sid].split("+++");this.Pid=Math.min(this.Pid,UrlArr.length);this.Url=this.ServerUrl+UrlArr[this.Pid-1].split("++")[1];this.NextUrl=this.ServerUrl+UrlArr[Math.min(this.Pid+1,UrlArr.length)-1].split("++")[1];this.UrlName=UrlArr[this.Pid-1].split("++")[0];this.UrlNextName=UrlArr[Math.min(this.Pid+1,UrlArr.length)-1].split("++")[0];var LastPid=Math.max(Math.abs(this.Pid-1),1);this.LastWebPage=this.ParentUrl.replace('sid-'+this.Sid+'-pid-'+this.Pid,'sid-'+this.Sid+'-pid-'+LastPid).replace(this.Id+'-'+this.Sid+'-'+this.Pid,this.Id+'-'+this.Sid+'-'+LastPid);var NextPid=Math.min(this.Pid+1,UrlArr.length);this.NextWebPage=this.ParentUrl.replace('sid-'+this.Sid+'-pid-'+this.Pid,'sid-'+this.Sid+'-pid-'+NextPid).replace(this.Id+'-'+this.Sid+'-'+this.Pid,this.Id+'-'+this.Sid+'-'+NextPid);if(this.Url==this.NextUrl){this.NextWebPage=''};document.write('<scr'+'ipt src="'+this.Root+'Public/player/'+this.PlayerName+'.js" type="text/javascript" ></scr'+'ipt>')}};
var $$ = function(value) {
return document.getElementById(value)
};
var killErrors = function(value) {
return true
};
window.onerror = null;
window.onerror = killErrors;
var Player = {
'ParentUrl': document.URL,
'ParentServerName': server_name.split("$$$"),
'ParentPlayerName': player_name.split("$$$"),
'Urllist': decodeURIComponent(url_list).split("$$$"),
'Id': '',
'Sid': '',
'Pid': '',
'Url': '',
'NextUrl': '',
'UrlName': '',
'UrlNextName': '',
'ServerUrl': '',
'ServerName': '',
'PlayerName': '',
'LastWebPage': '',
'NextWebPage': '',
'Root': ff_root,
'Buffer': ff_buffer,
'Pase': ff_buffer,
'Width': ff_width,
'Height': ff_height,
'Second': ff_second,
'Down_Gvod': 'http://union.ff84.com/ff20/gvod.html###' + ff_gvod + '###ppvod',
'Show': function() {
if (ff_showlist == 1) {
var list_show = 'block'
} else {
var list_show = 'none'
};
if (this.NextWebPage) {
var NextWebPage = this.NextWebPage
} else {
var NextWebPage = this.ParentUrl
};
$$('topleft').innerHTML = '<a href="' + this.LastWebPage + '">上一集</a> <a href="' + NextWebPage + '">下一集</a>';
$$('topcc').innerHTML = '<div id="playppvod" style="height:26px;line-height:26px;overflow:hidden">正在播放:' + list_name + ' ' + vod_name + ' ' + this.UrlName + '</div>';
$$('topright').innerHTML = '<a href="javascript:void(0)" onClick="Player.ShowList();">开启/关闭列表</a>';
$$('playleft').innerHTML = '<iframe src="' + this.Buffer + '" id="buffer" name="buffer" width="100%" height="' + this.Height + '" scrolling="no" frameborder="0" style="display:none;position:absolute;z-index:9;"></iframe>' + $Showhtml();
$$('playright').style.height = this.Height + 'px';
$$('playright').innerHTML = '<div id="list" style="display:' + list_show + ';height:' + this.Height + 'px">' + this.CreateList() + '</div>';
document.write('<scr' + 'ipt src="http://union.ff84.com/ff20/top.js" type="text/javascript"></scr' + 'ipt>')
},
'BufferHide': function() {
$$("buffer").style.display = "none"
},
'CreateList': function() {
var count_play = this.ParentPlayerName.length;
var html = '';
for (var i = 0; i < count_play; i++) {
if (this.Sid == i) {
ul_display = 'display:block';
h2class = 'h2_on'
} else {
ul_display = 'display:none';
h2class = 'h2'
};
var count_urls = this.Urllist[i].split("+++");
var sid_on;
var sub_on;
var html_sub;
html_sub = '<div style="' + ul_display + '" id="sub' + i + '">';
for (var j = 0; j < count_urls.length; j++) {
var href = this.ParentUrl.replace('sid-' + this.Sid + '-pid-' + this.Pid, 'sid-' + i + '-pid-' + (j + 1)).replace(this.Id + '-' + this.Sid + '-' + this.Pid, this.Id + '-' + i + '-' + (j + 1));
if (this.Sid == i && this.Pid == (j + 1)) {
var li_on = ' class="list_on"'
} else {
li_on = ''
};
html_sub += '<span><a href="' + href + '" title="' + count_urls[j].split("++")[0] + '" ' + li_on + '>' + count_urls[j].split("++")[0] + '</a></span>'
};
html_sub += '</div>';
html += '<div id="main' + i + '" class="' + h2class + '">';
html += '<h2 onclick="Player.Tabs(' + i + ',(count_play - 1) + ')">>>' + eval('play_' + this.ParentPlayerName[i]) + '</h2>';
html += html_sub;
html += '</div>'
};
return html
},
'ShowList': function() {
if ($$('list').style.display == "none ") {
$$('list').style.display = "block "
} else {
$$('list').style.display = "none "
}
},
'Tabs': function(no, n) {
var subdisply = $$('sub' + no).style.display;
for (var i = 0; i <= n; i++) {
$$('main' + i).className = 'h2';
$$('sub' + i).style.display = 'none'
};
$$('main' + no).className = 'h2_on';
if (subdisply == 'none') {
$$('sub' + no).style.display = 'block'
} else {
$$('sub' + no).style.display = 'none'
}
},
'Install': function() {
var downurl = eval('ff_' + this.PlayerName);
$$("install ").innerHTML = '<iframe border="0 " src="http: //union.ff84.com/install/' + this.PlayerName + '.html?u=' + downurl + '&v=20120224" marginWidth="0" frameSpacing="0" marginHeight="0" frameBorder="0" noResize scrolling="no" width="100%" height="' + this.Height + '" vspale="0"></iframe>';
$$('install').style.display = 'block'
},
'Html': function() {
document.write('<div class="FF"><table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="2"><table><tr><td width="100" id="topleft"></td><td id="topcc"></td><td width="100" id="topright"></td></tr></table></td></tr><tr><td colspan="2" id="install" style="display:none"></td></tr><tr><td id="playleft" valign="top"> </td><td id="playright" valign="top"> </td></tr></table></div>')
},
'Play': function() {
this.Html();
var URL = this.ParentUrl.match(/\d+.*/g)[0].match(/\d+/g);
var Count = URL.length;
this.Id = URL[(Count - 3)] * 1;
this.Sid = URL[(Count - 2)] * 1;
this.Pid = URL[(Count - 1)] * 1;
this.ServerName = this.ParentServerName[this.Sid];
this.PlayerName = this.ParentPlayerName[this.Sid];
if (this.ServerName) {
this.ServerUrl = eval('ff_' + this.ServerName)
};
var UrlArr = this.Urllist[this.Sid].split("+++");
this.Pid = Math.min(this.Pid, UrlArr.length);
this.Url = this.ServerUrl + UrlArr[this.Pid - 1].split("++")[1];
this.NextUrl = this.ServerUrl + UrlArr[Math.min(this.Pid + 1, UrlArr.length) - 1].split("++")[1];
this.UrlName = UrlArr[this.Pid - 1].split("++")[0];
this.UrlNextName = UrlArr[Math.min(this.Pid + 1, UrlArr.length) - 1].split("++")[0];
var LastPid = Math.max(Math.abs(this.Pid - 1), 1);
this.LastWebPage = this.ParentUrl.replace('sid-' + this.Sid + '-pid-' + this.Pid, 'sid-' + this.Sid + '-pid-' + LastPid).replace(this.Id + '-' + this.Sid + '-' + this.Pid, this.Id + '-' + this.Sid + '-' + LastPid);
var NextPid = Math.min(this.Pid + 1, UrlArr.length);
this.NextWebPage = this.ParentUrl.replace('sid-' + this.Sid + '-pid-' + this.Pid, 'sid-' + this.Sid + '-pid-' + NextPid).replace(this.Id + '-' + this.Sid + '-' + this.Pid, this.Id + '-' + this.Sid + '-' + NextPid);
if (this.Url == this.NextUrl) {
this.NextWebPage = ''
};
document.write('<scr' + 'ipt src="' + this.Root + 'Public/player/' + this.PlayerName + '.js" type="text/javascript" ></scr' + 'ipt>
'
function asciiHex2native(strAscii) {
var output = "";
var posFrom = 0;
var posTo = strAscii.indexOf("\\x", posFrom);
while (posTo >= 0) {
output += strAscii.substring(posFrom, posTo);
var s="";
s=strAscii.substr(posTo, 4).replace("\\x","")
var arr=s.split(""), n=arr.length,k=0, s=0
for(var i=0;i<n;i++){
k=n-i-1;
if(arr[i]=="a"){arr[i]=10;}
else if(arr[i]=="b"){arr[i]=11;}
else if(arr[i]=="c"){arr[i]=12;}
else if(arr[i]=="d"){arr[i]=13;}
else if(arr[i]=="e"){arr[i]=14;}
else if(arr[i]=="f"){arr[i]=15;}
s+=(arr[i])*Math.pow(16,k);
}
output += String.fromCharCode(s);
posFrom = posTo + 4;
posTo = strAscii.indexOf("\\x", posFrom);
}
return ascii2native(output);
}
function ascii2native(strAscii) {
var output = "";
var posFrom = 0;
var posTo = strAscii.indexOf("\\u", posFrom);
while (posTo >= 0) {
output += strAscii.substring(posFrom, posTo);
output += toChar(strAscii.substr(posTo, 6));
posFrom = posTo + 6;
posTo = strAscii.indexOf("\\u", posFrom);
}
output += strAscii.substr(posFrom);
return output;
}
function toChar(str) {
if (str.substr(0, 2) != "\\u") return str;
var code = 0;
for (var i=2; i<str.length; i++) {
var cc = str.charCodeAt(i);
if (cc >= 0x30 && cc <= 0x39)
cc = cc - 0x30;
else if (cc >= 0x41 && cc <= 0x5A)
cc = cc - 0x41 + 10;
else if (cc >= 0x61 && cc <= 0x7A)
cc = cc - 0x61 + 10;
code <<= 4;
code += cc;
} if (code < 0xff) return str;
return String.fromCharCode(code);
}