会声会影视频制作教程
来源:新闻资讯 /
时间: 2025-03-20
function switchTab(n){
for(var i = 0; i < 4; i++){
document.getElementById("tab_" + i).className = "";
document.getElementById("tab_con_" + i).style.display = "none";
}
document.getElementById("tab_" + n).className = "on";
document.getElementById("tab_con_" + n).style.display = "block";
}
function expand(id){
var e = document.getElementById(id);
e.className = (e.className=="compress") ? "expand" : "compress";
var d = document.getElementById('ex');
d.className = (d.className=="exoff") ? "exon" : "exoff";
}
function order(obj){ //介绍页集数列表(升序,降序排列)
var e = document.getElementById("Button"+obj);
e.className = (e.className=="orderAsc") ? "orderDesc" : "orderAsc";
var html = $("#list" + obj).html();
html = html.toLowerCase();
var arr=html.split("</li>");
arr.pop(); //分解数组,并去掉最后一个无效的
html = arr.reverse().join("</li>")+"</li>";
$("#list" + obj).html(html);
}
function expand_contract(el){ //介绍页集数列表(展开与收起)
if(el.className==''){ //展开
el.className = 'on';$('#hua_list_div').removeClass('max-h360');el.innerHTML = "<em>折叠</em>";
}else{ //收缩
el.className='';$('#hua_list_div').addClass('max-h360');el.innerHTML = "<em>展开</em>";
}
}
function closeList() { //关闭播放列表
$('#a2').hide();
$('#playerlist').hide();
$('#a3').show();
$('#a1').width(1166);
$('.listTitle').hide();
}
function openList() { //打开播放列表
$('#a2').show();
$('#playerlist').show();
$('#a3').hide();
$('#a1').width(825);
$('.listTitle').show();
}
function reloadPlayer(){
play(currentId);
}
// 正常:77123-0-1,兼容:77123-1-1
$(document).ready(function(){
var winLink = location.search;
//var currentId = (winLink == '') ? 1: winLink.replace('?'+SiteId+'-0-','');
var currentId = 1;
if(5 == 1){
closeList();
}
if(winLink != ''){
var arr = winLink.split("-");
currentId = parseInt(arr[2]);
}
$('#download').attr('href','/down/'+SiteId+'-0-'+currentId+'.html');
$('#currentId').html(parseInt(currentId));
play(parseInt(currentId));
});
//play(1);
document.getElementById('menu6').className = "nav-current";
$("#menu6").append('<div class="arrow"></div>');
function play(video){
for (i = 0; i <= itemNum; i++) {
if (i != video) {
$('#vli_' + i).removeClass("on");
} else {
$('#vli_' + i).toggleClass("on");
}
}
$('#download').attr('href','/down/'+SiteId+'-0-'+video+'.html');
$('#currentId').html(video);
var url = '/mix/ajax/parse/id/'+SiteId+'-0-'+video;
$('#a1').html("正在加载……");
createXmlHttp(); //创建XMLHttpRequest对象
xmlHttp.onreadystatechange = writeSource; //设置回调函数
xmlHttp.open("GET", url, true);
xmlHttp.send(null);
}
function createXmlHttp() {
//根据window.XMLHttpRequest对象是否存在使用不同的创建方式
if (window.XMLHttpRequest) {
xmlHttp = new XMLHttpRequest(); //FireFox、Opera等浏览器支持的创建方式
} else {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");//IE浏览器支持的创建方式
}
}
function writeSource() {
if (xmlHttp.readyState == 4) {
var html = xmlHttp.responseText;
$('#a1').html(html);
}
}
function playPrevious(){
var currentId = parseInt($('#currentId').html());
if (currentId != 1){
play(currentId-1);
}
}
function playNext(){
var currentId = parseInt($('#currentId').html());
if (currentId < itemNum){
play(currentId+1);
}
}