这句话while 1 是什么意思思啊while(html.indexOf("</p></p>")!=-1) html=html.replace("</p></p>","</p>");

html 语言里面的&p&&&#47;p&有什么用,有什么效果_百度知道
html 语言里面的&p&&&#47;p&有什么用,有什么效果
是不是就换行的用处。那跟BR效果不是一样!?
提问者采纳
不一样,&p&&/p&这个是指段落,你可以参照一下
其他类似问题
为您推荐:
其他3条回答
&p&代表一个段落,里面可以有文字或其它内容,可指定对齐方式等等,而&br&只是单纯的换行。
&p&&/p&段落的开始与结束,br是换行的意思,
br是换行p是分段
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁//更新时间 日15:15 修改调用专辑视频数量
function logins(){
login(callback);
//flash播放器内置回调函数bug
function endcall(){var s=function(){__flash__removeCallback=function(i,n){
if(i)i[n]=};window.setTimeout(s,10);};s();}
window.onbeforeunload =
//防止与prototype.js冲突
jQuery.noConflict();
//空间命名空间
var ZONE = (function($){
//获取浏览器信息
var ua=window.navigator.userAgent.toLowerCase();
//标题截取
function substring(str,len){if(!str)var str_length=0,str_len=0;str_cut=new String();str_len=str.for(var i=0;i4){str_length++};str_cut=str_cut.concat(a);if(str_length>=len){str_cut=str_cut.concat("");return str_cut}};if(str_length0){
var left=-that.pageindex*that.
that.animate(left)
this.next.click(function(){
if(!that.ul.is(':animated')){
if(that.pageindex<that.pagenum-1){
var left=-that.pageindex*that.
that.animate(left);
//滑动页码
$('.z-special-video-page',this.box).click(function(e){
var target = e.target, $target = $(target), tagName = target.tagName.toUpperCase();
var index,
if(tagName == 'A'){
index = $target.parent().attr('page');
if(index == that.pageindex){
that.pageindex =
left =- that.pageindex * that.
that.animate(left);
//视频点击播放
$('.z-special-video-list', this.box).click(function(e){
var target = e.target, tagName = target.tagName.toUpperCase(), li = $(target).parents('li:first');
if(tagName=='A'||tagName=='SPAN'||tagName=='IMG'){
var pid=that.pid,vid=li.attr('vid'),index=parseInt(li.attr('index'));
var id=$(target).parents('.z-special-video-box').attr('id');
if(!li.hasClass('active')){
if(Video.video.pid!=pid){
Video.video.pid=
Video.video.list=[];
that.li.each(function(){
Video.video.list.push($(this).attr('vid'))
Video.play(index)
animate:function(left){
this.ul.animate({
}, this.speed,function(){
that.css()
makePage:function(){
var ret=[''];
for(var p=0;p<this.p++){
ret.push(' ')
ret.push('');
this.pageBox=$('.z-special-video-page',this.box);
if(this.pageBox.length>0){
this.pageBox.html(ret.join(''))
$(''+ret.join('')+'').appendTo(this.box)
if(this.pagenum<=1){
this.prev.hide();
this.next.hide();
$('.z-special-video-page',this.box).hide()
this.prev.show();
this.next.show();
$('.z-special-video-page',this.box).show()
resetPage:function(index){
var li=$('li:eq('+index+')',this.ul);
li.addClass('active');
var liindex=parseInt(li.attr('index'))+1,index=Math.ceil(liindex/this.pagesize)-1;
if(index!=this.pageindex){
this.setPage(index)
setPage:function(index){
this.pageindex=
var left=-this.pageindex*this.
this.animate(left);
return this
setContent:function(content){
this.isInit=
this.ul.html(this.ul.html() + content);
this.reset();
return this
css:function(){
$('li.active',this.pageBox).removeClass('active');
$('li[page="'+this.pageindex+'"]',this.pageBox).addClass('active')
clearCss:function(){
this.li.removeClass('active')
//分页函数
function paging(){var pageNum=Math.ceil(this.pageCount);var pageStr='';var page=this.pageIvar count=pageNvar events=this.var pagebox=this.var pageHome='',pageEnd='';if(count<=10){for(var i=1;i<=i++){if(i==page){pageStr+=''+i+''}else{pageStr+=''}}}else{if(page<=4){for(var i=1;i<=7;i++){if(i==page){pageStr+=''+i+''}else{pageStr+=''}};pageStr+='...';pageStr+=pageEnd};if(page>4&&page<count-4){pageStr+=pageHpageStr+='...';pageStr+='';pageStr+='';pageStr+='';pageStr+=''+page+'';pageStr+='';pageStr+='';pageStr+='';pageStr+='...';pageStr+=pageEnd};if(page>=count-4){pageStr+=pageHpageStr+='...';for(var i=count-7;i<=i++){if(i==page){pageStr+=''+i+''}else{pageStr+=''}}}};if(page>1){pageStr+=''}else{pageStr+='上一页'};if(page<count){pageStr+=''}else{pageStr+='下一页'};$(pagebox).html(count>1?pageStr:'')};
API功能列表
--------------------------------*/
_clientID: '872d663d12787d14',
_http: '/v2',
playlist: '/playlists/by_user.json',
playlistVideo: '/playlists/videos.json',
video: '/videos/show.json',
videoUp: '/videos/up.json',
videoDown: '/videos/down.json',
follow: '/users/friendship/create.json',
userinfo: '/users/show.json',
searchTag: '/searches/video/by_tag.json'
get: function(type,params) {
return this._http + this._url[type] + '?client_id=' + this._clientID + '&' + params.join('&');
//视频播放
var Video={
playing: false,
isHtml5: /ipad|iphone|ipod/gi.test(ua),
playerType: /android/gi.test(ua),
after: {},
init: function(){
this.$commentlist=$('#z-video-comment-list');
//评论(显示/关闭)
$('.z-video-comment-btn a:first').click(function(){
that.$commentlist.toggle();
//评论收起
$('span', this.$commentlist).click(function(){
$(this).parent().hide();
//关闭视频
$('.z-video-close').click(function(){
that.close();
//初始化播放按钮事件
var zVideoButton = $('.z-video-button');
zVideoButton.show().find('a').click(function(){
if (!Config.original) {
//Config.playlist =
//Config.vid =
//Config.ext =
Config.video.auto = 1;
that.auto();
//扩展自定义swf/iframe
ext: function(){
var ext = Config.
var str = '';
function showSwf(){
var so = new SWFObject(ext.src, "tv_swf", "100%", "100%", "7", "");
so.write("youkuplayer");
//自定义swf
if (ext.type == 'swf') {
if (typeof SWFObject != 'function') {
var script = document.createElement('script');
script.type = 'text/javascript';
script.onload = script.onreadystatechange = function(){
if(!this.readyState || this.readyState == "loaded" || this.readyState == "complete") {
showSwf();
script.src = '/v/js/swfobject.js';
document.getElementsByTagName('head')[0].appendChild(script);
showSwf();
//自定义iframe
if (ext.type == 'iframe'){
$('#youkuplayer').html(str);
//显示关闭按钮
$('.z-video-close').show();
//隐藏播放按钮
$('.z-video-button').hide();
//自动播放
auto: function() {
var that =
var video = Config.
var playlist = Config.
var ext = Config.
var startTime = new Date().getTime(), endT
//正在播放 或者 未设定自动播放
if (that.playing || !video.auto)
if (this.autoTimer) { clearTimeout(this.autoTimer); this.autoTimer = }
//自动播放视频
if (video) {
//1) 自定义视频
if (Config.vid) {
this.autoTimer = setTimeout(function(){
//播放自定义视频
that.playVideoById(Config.vid);
}, video.auto);
//2) 自定义专辑视频
if (playlist && playlist.id && (typeof playlist.index != undefined) ) {
(function(){
endTime = new Date().getTime();
var diffTime = Math.floor((endTime - startTime));
var list = $('#zpvl' + playlist.id), a = list.find('a');
if (list.length > 0 && a.length > 0 && diffTime >= video.auto) {
$('.z-special-video-list a:eq(' + playlist.index + ')', list).click();
//直到专辑加载完毕
setTimeout(arguments.callee, 1000);
//3) 显示自定义扩展
if (ext && ext.type && ext.src) {
that.ext();
//4) 默认视频
if (video.id && video.id != '') {
this.autoTimer = setTimeout(function(){
//播放自定义视频
that.playVideoById(video.id);
}, video.auto);
//5) 第一个专辑第一支视频
(function(){
endTime = new Date().getTime();
var diffTime = Math.floor(endTime - startTime);
var active = $('#z-special-list li.active'),
if (active.length > 0) {
list = $('#zpvl' + active.attr('pid'));
if (list.length > 0 && diffTime >= video.auto) {
$('.z-special-video-list a:eq(0)', list).click();
//直到专辑加载完毕
setTimeout(arguments.callee, 1000);
//播放下一支视频
next: function(){
var isAllVideo = Config.allvideo && AllVideo.pageCount > 0;
++this.video.
if (this.video.index >= this.video.list.length) {
Video.playing =
//全部视频页连续播放
if (isAllVideo && Config.allvideo.continued ) {
if (AllVideo.pageIndex < AllVideo.pageCount) {
AllVideo.get(++AllVideo.pageIndex, true);
if (isAllVideo && !Config.allvideo.continued)
Video.play(this.video.index);
//获取播放器flash对象
movieObj:function(){
var movieName=this.movieN
if (navigator.appName.indexOf("Microsoft") != -1) {
return window[movieName];
return document[movieName];
//播放名称(统一)
movieName:'youkuplayer',
//加载播放器
loadPlayer: function(vid){
var movieBox = this.movieName, movieName=this.movieN
var youkuplayer = document.getElementById(movieBox);
if (typeof youkuplayer == 'undefined') {
movieBox = 'youku-player';
var client_id = API._clientID;
if (Config && Config.show_adv_videos && Config.show_adv_videos.indexOf(vid) != -1 || Config.show_adv_videos == 'all') {
client_id = '_youku_';
this.player = new YKU.Player(movieBox, {
'client_id': client_id,
'vid': vid,
'autoplay': true,
'show_related': false,
'events': {
'onPlayStart': function(){ },
'onPlayEnd':
function(){ ZONE.video.next(); }
this.playing =
//显示关闭按钮
$('.z-video-close').show();
//隐藏播放按钮
$('.z-video-button').hide();
//播放函数
play:function(index){
var vid=this.video.list[index];
//this.player.playVideoById(vid);
this.movieObj().playVideoByID(vid);
//catch(e){
this.loadPlayer(vid);
//接口(请求视频详细信息)
var url=API.get('video', ['video_id=' + vid, 'callback=ZONE.video.callback']);
jsonP(url);
this.video.id=
this.video.index=
if (this.after && this.after.reset && this.after.set) {
this.after.reset();
this.after.set.call(this);
//关闭视频
close: function() {
this.playing =
$('#youkuplayer, #z-video-title, #z-view, #z-video-share, .z-video-updown').html('');
$('.z-video-comment-btn, .z-video-close').hide();
$('.z-video-button').show();
(this.after && this.after.reset) && this.after.reset();
//接口(解析视频详细信息)
callback:function(re){
var vid=re.id,url=re.link,title=re.title,up=re.up_count,down=re.down_count,view=re.view_count,pic = re.
$('#z-video-title').html(title);
$('#z-view').show().html('播放数:'+view+'');
$('.z-video-updown').html('' + up + '' + down + '');
$('.z-video-comment-btn').show();
$('#z-video-comment-list div').html(Comment.get(vid));
Share.video(url,title,pic);
playVideoById: function(vid) {
this.loadPlayer(vid);
var url=API.get('video',['video_id='+vid,'callback=ZONE.video.callback']);
jsonP(url);
//专辑列表功能
var Playlist={
//视频列表滑动对象组
init:function(){
var url=API.get('playlist',['user_name='+encodeURI(Config.uname),'page=1','count=100','callback=ZONE.playlist.callback']);
jsonP(url);
this.$box=$('#z-special-list');
//事件委托
this.$box.click(function(e){
var target=e.target,$target=$(target),tagName=target.tagName.toUpperCase();
if(tagName=='A'){
var pid=$target.attr('playlist_id');
!that.obj['p'+pid].isInit&&PlaylistVideo.get( {pid: pid} );
$('.z-special-video div').removeClass('active');
$('#zpvl'+pid).addClass('active');
$target.parent().siblings().removeClass('active');
$target.parent().addClass('active');
callback:function(re){
if (!re || re.error)
var total=re.total > 9 ? 9 : re.total,
playlist = re.
this.cache =
//排序(专辑列表通过前缀playlist_num)
playlist=re.playlists.sort(function(a,b){
a=parseInt(a.name.substring(9,10));
if (!a) {a=100;}
b=parseInt(b.name.substring(9,10));
return(a>b)?1:-1;
var pid, pname, temp = [];
for(var i = 0; i <i++){
pl = playlist[i];
if (pl.name.indexOf('playlist_') != -1) {
pname=pl.name.replace(/^playlist_\d/,'');
temp.push('');
$('上一组下一组').appendTo('.z-special-video');
//实例化视频列表滑动对象
this.obj['p'+pid]=new SlideVideo( { pid: pid });
//默认(到指定专辑或第一个专辑下的视频列表)
if (Config.playlist) {
$('ul',this.$box).html(temp.join('')).find('li[pid=' + Config.playlist.id + ']').addClass('active').find('a').click();
$('ul',this.$box).html(temp.join('')).find('li:first').addClass('active').find('a').click();
var After = {
reset: function() {
//样式(处理全部视频列表)
for(var p in Playlist.obj){
Playlist.obj[p].clearCss();
set: function() {
//状态(设置视频滑动分页)
Playlist.obj['p'+this.video.pid].resetPage(this.video.index);
Video.after = A
//初始化自定义专辑列表
AllSpecial.init();
//获取专辑视频
var PlaylistVideo = {
cache: {},
get:function(options){
this.pid = options.
var pid=this.pid,
function random(min, max){
return parseInt(Math.random() * (max - min + 1) + min);
url=API.get('playlistVideo',['playlist_id=' + pid,'page=' + this.page, 'count=' + random(80, 100), 'callback=ZONE.playlistVideo.callback']);
jsonP(url);
callback:function(re){
if (!re||re.error||re.playlist_id!=this.pid)
var total = re.total, videos = re.videos, temp = [], len = videos.
for(var i=0,i<i++){
video=videos[i];
if(video){
temp.push('正在播放');
Playlist.obj['p'+this.pid].setContent(temp.join(''));
if (len == re.count) {
this.index = this.index || i-1;
this.page++;
this.get({pid: this.pid});
//Playlist.obj['p'+this.pid].reset();
//专辑列表(全部/或者指定专辑id)
var AllSpecial = {
pid:0,name:'',videos:[]
//专辑列表模板
//设置参数用于分页功能
pagebox:'#z-allspecial-page',
events:'ZONE.allspecial.init',
pagesize: Config.pagesize.list,
pageIndex:1,
pageCount:0,
init: function(index){
this.$Box=$('#z-commend-box');
var page=1;
var playlist_id = this.$Box.attr('playlist_id'),
num = this.$Box.attr('num'),
len = this.$Box.attr('len') || 5;
this.opt = {};
if(playlist_id){
this.opt = {
pid: playlist_id,
this.pagesize = 100;
this.opt.num = parseInt(num);
if (index && index > 1) {
page = index
this.pageIndex =
this.temp = [];
var html = '';
var pageContent = this.cache['page'+this.pageIndex];
if(pageContent){
for(var rows=0;rowstotal?total:
//按指定专辑顺序显示
if (this.opt && this.opt.pid) {
pids = this.opt.pid.split(',');
var len = pids.length > this.opt.len ? this.opt.len : pids.
for (var i = 0; i < i++) {
for (var j = 0; j < j++) {
pl = playlist[j];
if (pl && pl.id === parseInt(pids[i])) {
html=this.tpl.replace(/\{special_id\}/g,pl.id);
html=html.replace('{config_floder}', Config.floder);
html=html.replace('{special_link}',pl.play_link);
html=html.replace('',pl.name.replace(/^playlist_\d/,''));
html=html.replace('{special_name}',encodeURI(pl.name.replace(/^playlist_\d/,'')));
this.pid.push(pl.id);
this.temp.push(html);
//按原专辑顺序显示
for(var i=0;i<i++){
pl=playlist[i];
if(pl && pl.name.indexOf('$mobile$') == -1){
html=this.tpl.replace(/\{special_id\}/g,pl.id);
html=html.replace('{config_floder}', Config.floder);
html=html.replace('{special_link}',pl.play_link);
html=html.replace('',pl.name.replace(/^playlist_\d/,''));
html=html.replace('{special_name}',encodeURI(pl.name.replace(/^playlist_\d/,'')));
this.pid.push(pl.id);
this.temp.push(html);
if(!this.cache['page'+this.pageIndex]){
this.cache['page'+this.pageIndex]=[];
this.cache['page'+this.pageIndex].push({
pid:pl.id,link:pl.play_link,name:pl.name.replace(/^playlist_\d/,''),videos:[]
this.$Box.html(this.temp.join(''));
//分页初始化
paging.call(this);
this.get();
//全部专辑视频接口
get: function(opt){
var list,page,pid,num=100;
list=opt||this.
function random(min, max){
return parseInt(Math.random() * (max - min + 1) + min);
for(var i=0;ithis.opt.num?this.opt.num:re.total,pid=re.playlist_id,videos=re.
var temp=[],str='';
var cache=this.cache['page'+this.pageIndex];
for(var i=0;i<i++){
if (videos[i]) {
temp.push(str);
if(cache){
for(var p=0;p<cache.p++){
if(cache[p].pid==pid){
cache[p].videos.push(str)
for(var j=0;j<this.pid.j++){
if(this.pid[j]==pid){
$('div[playlist_id="'+pid+'"] ul',this.$Box).html(temp.join(''));
this.pid.splice(j,1)
var Share = {
//分享空间
zone:function(){var that =
var url = window.location.href, title = document.
if (!Config.share) {
Config.share = {};
var share = Config.
(!share.title) && (share.title = title);
(!share.wbimg) && (share.wbimg = '');
(!share.url) && (share.url = url);
var str = this.str.replace(/\{url\}/gi, encodeURI(share.url))
.replace(/\{title\}/gi, encodeURI(share.title))
.replace(/\{pic\}/gi, encodeURI(share.wbimg));
$('#z-share').html(str);
this.css();
//微信内置浏览事件
if(document.addEventListener){
document.addEventListener('WeixinJSBridgeReady', function(){that.weixin();}, false);
}else if(document.attachEvent){
document.attachEvent('WeixinJSBridgeReady'
, function(){that.weixin();});
document.attachEvent('onWeixinJSBridgeReady' , function(){that.weixin();});
//分享视频
video:function(url,title,pic){
var str=this.str.replace(/\{url\}/gi,url).replace(/\{title\}/gi,encodeURI(title)).replace(/\{pic\}/gi, pic);
$('#z-video-share').html(str);
weixin: function() {
if (!!Config && !Config.share)
var WX = Config.share, href = location.href, floder = Config.floder, pos = href.indexOf(floder), len = pos + floder.
(!WX.wximg)
&& (WX.wximg = '');
(!WX.width)
&& (WX.width = '120');
(!WX.height)
&& (WX.height = '120');
(!WX.title)
&& (WX.title = document.title);
&& (WX.url = location.href.substring(0, len));
var shareData = {
: WX.wximg,
"img_width"
: WX.width,
"img_height"
: WX.height,
: WX.title
WeixinJSBridge.on('menu:share:appmessage', function(b){
WeixinJSBridge.invoke('sendAppMessage', shareData, function(res){ });
WeixinJSBridge.on("menu:share:timeline", function(b) {
WeixinJSBridge.invoke('shareTimeline', shareData, function(res){ });
css: function() {
var cssStr = '.zz-share a { margin-left:8 background:url(/5F4DA80A6) no-repeat -9999 }\n' +
'.zz-share .s-weixin { background-position:-146px 0; _background: _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/5E5E29BB4", sizingMethod="crop");}\n' +
'.zz-share .s-weixin:hover { background-position:-146px -26 _background: _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/5E5FB02AA92", sizingMethod="crop");}';
var style = document.createElement('style');
style.type = 'text/css';
if(style.styleSheet){// IE
style.styleSheet.cssText = cssS
} else {// w3c
style.innerHTML = cssS
document.getElementsByTagName('head')[0].appendChild(style);
//关注空间
var Follow = {
add:function(_this){
this._this=_
var islogin = MiniHeader.islogin();
//检测登录状态
if(!islogin){
//MiniHeader.login();
if(this.status) {
alert('关注关系已存在');
var url=API.get('follow',['user_name='+encodeURI(Config.uname),'callback=ZONE.follow.callback']);
jsonP(url);
callback:function(re){
if(re.error){
var code=re.error.code.toString(),
code=code.substring(code.length-3);
switch(code){
case'300':error='超过最大关注数';
case'301':error='关注的人不存在';
case'302':error='关注关系已存在';
case'303':error='关注关系不存在';
case'304':error='用户昵称不存在';
case'305':error='关注的人无效:已被删除或屏蔽';
case'306':error='用户在指定时间段添加关注过多';
case'307':error='用户在指定时间段取消关注过多 ';
default:error='操作失败';
alert(error);
this.status=
alert('关注成功');
//会员信息
var User = {
init:function(){
var url=API.get('userinfo',['user_name='+encodeURI(Config.uname), 'callback=ZONE.user.callback']);
jsonP(url)
callback:function(re){
if(!re||re.error)
var name = re.name,
thumbnail = re.avatar,
description = re.description || '';
//自定义会员名和logo图片
if (Config.head) {
if (Config.head.logo) {
thumbnail = Config.head.
if (Config.head.title) {
name = Config.head.
//会员信息
$('#z-userinfo').html('' + name + '' + description.replace(/\n/gi, '') + '');
//页头信息
$('#z-logo').html('' + name);
//视频评论
var Comment = {
get:function(vid){
return '';
//搜索功能
var Search = {
//初始化用于分页功能
pagebox:'#z-searchpage-page',
events:'ZONE.search.init',
pagesize:Config.pagesize.videolist,
init:function(index){
var page=1;
var url=window.location.
var tag=this._getParam(url,'t');
if(tag=='')
$('#z-searchpage-keyword, .z-searchpage-nothing .key').html(decodeURI(tag));
if(index&&index>1){
page=index
this.pageIndex=
var url=API.get('searchTag',['page='+page,'count=' + this.pagesize,'tag='+tag, 'userid=' + Config.uid, 'orderby=published', 'callback=ZONE.search.callback']);
jsonP(url)
_getParam:function(str,name){
var reg=new RegExp("(\\?|\\&)"+name+"=([^\\&]*)(\\&?)","i").exec(str);
return RegExp.$2
callback:function(re){
if(!re||re.error)
var videos=re.videos,len=videos.length,total=re.
var temp=[''];
this.pageCount=total/this.
for(var i=0,i<i++){
video=videos[i];
temp.push('');
temp.push('');
if (temp.length <= 2) {
$('.z-searchpage-head').hide();
$('.z-searchpage-nothing').show();
$('.z-searchpage-head').show();
$('#z-searchpage-list').html(temp.join(''));
//初始化分页
paging.call(this);
init: function() {
function goto() {
window.location.href = Config.floder + '/search?t=' + encodeURI($kw.val());
var $kw = $('#kw');
$kw.click(function(){
var self = $(this);
if(self.val() =='搜索') self.val('');
}).keypress(function(e){
if (e.keyCode == '13') {
$('#kw-search').click(function(e){
//通过专辑id获取全部视频
var AllVideo = {
_getParam:function(str,name){
var reg=new RegExp("(\\?|\\&)"+name+"=([^\\&]*)(\\&?)","i").exec(str);
return RegExp.$2
listBox:'#z-allvideo-list',
pagebox:'#z-allvideo-page',
events:'ZONE.allvideo.get',
pageCount:0,
pagesize: Config.pagesize.videolist,
pageIndex:1,
api:'/v2/playlists/videos.json?client_id=872d663d12787d14&',
init: function() {
this.pid = this._getParam(location.search, 'pid');
this.pname = decodeURI(this._getParam(location.search, 'pname'));
$('#z-allvideo-pname').html(this.pname);
this.get(1);
if (Config.allvideo) {
$('.z-video').show();
$('.z-video-button').show().find('a').click(function(){
Video.play(0);
bind: function() {
$(this.listBox + ' a').click(function(){
Video.play($(this).attr('index'));
get: function(page, isauto) {
this.isauto = isauto ||
this.pageIndex=
var url=API.get('playlistVideo',['playlist_id='+this.pid,'page=' + this.pageIndex,'count=' + this.pagesize,'callback=ZONE.allvideo.callback']);
jsonP(url);
callback: function(re) {
if(!re||re.error)
var that =
var total=parseInt(re.total),count=re.count,videos=re.
var temp=[''];
this.pageCount=Math.ceil(total/this.pagesize);
count=count>total?total:
//往播放对象添加视频数据
Video.video.pid = this.
Video.video.list = [];
for(var i=0,i<i++){
video=videos[i];
if (video) {
Video.video.list.push(video.id);
temp.push('正在播放');
temp.push('');
$(this.listBox).html(temp.join(''));
paging.call(this);
//全部视频播放
if (Config.allvideo && Config.allvideo) {
this.bind();
if (!Video.playing && this.isauto) {
Video.play(0);
var After = {
set: function() {
$(that.listBox + ' li').removeClass();
$(that.listBox + ' li:eq(' + this.video.index + ')').addClass('active');
reset: function() {
$(that.listBox + ' li').removeClass();
Video.after = A
//页面初始化
function init() {
jsonP('/jsapi');
var href = window.location.
var page = ['index', 'search', 'list', 'special', 'allvideo'];
for (var p = 0, len = page. p < p++) {
if (href.indexOf(page[p]) != -1) {
pageName = page[p];
(!pageName) && (pageName = 'index');
//初始化用户信息
ZONE.user.init();
//初始化分享
ZONE.share.zone();
//初始化搜索条动作
ZONE.search.action.init();
switch (pageName){
case 'index':
var vid = getParam(href, 'vid'),
pid = getParam(href, 'pid');
//自定义默认视频播放
if (vid) {
Config.vid =
//自定义默认专辑播放
if (pid) {
pid = pid.split(':');
Config.playlist = {
id: pid[0],
index: pid[1] || 0
//自定义扩展
var ext = getParam(href, 'ext');
if (ext) {
ext = ext.split(',');
if (!/http\:\/\//i.test(ext[1]))
ext[1] = 'http://' + ext[1];
Config.ext = {
type: ext[0],
src: ext[1]
ZONE.video.init();
ZONE.video.auto();
ZONE.playlist.init();
case 'list':
ZONE.allspecial.init();
case 'search':
ZONE.search.init();
case 'allvideo':
ZONE.video.init();
ZONE.allvideo.init();
case 'special':
$(function(){ init(); });
user:User,
video:Video,
playlist:Playlist,
playlistVideo:
PlaylistVideo,
follow:Follow,
share:Share,
search:Search,
allspecial:
AllSpecial,
allvideo: AllVideo
})(jQuery);}

我要回帖

更多关于 while p 是什么意思 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信