📄 home.js
字号:
/*
Copyright (C) 2006 dooogo.com
Author:benben
www.aspxclub.com
*/
function PhotoNoDowd()
{
var body = window.document.getElementsByTagName("body")[0];
body.oncontextmenu=function()
{
return false;
}
body.onselectstart=function()
{
return false;
}
}
function OpenPlayer(registerId)
{
var ids="";
var isHas=false;
var objs=document.getElementsByName('checkID');
for(var i=0;i<objs.length;i++)
{
if(objs[i].checked==true)
{
ids+=objs[i].value+",";
isHas=true;
}
}
if(isHas==false)
{
alert('请选择要播放的音乐!');
return ;
}
window.open(ServerPath+'Home/MP3Player/MP3Player.aspx?RegisterId='+registerId+'&ids='+ids,'MP3Player','width=345px,height=390px');
}
var count = 10;
function Picture(objId)
{
var oImage = document.getElementById(objId);
count = Counting(count);
Resize(count,objId);
return false;
}
function Counting(count){
if (event.wheelDelta >= 120)
{
if(count<100)
count++;
}
else if (event.wheelDelta <= -120)
{
if(count>1)
count--;
}
return count;
}
function Resize(count,objId){
var oImage = document.getElementById(objId);
oImage.style.zoom = count + '0%';
setValueById('ozoom',count + '0%');
}
function FreeResize(objId){
var oImage = document.getElementById(objId);
var i;
if(oImage.width>600)
{
i=(730/oImage.width*100);
count=Math.round(i/10);
oImage.style.zoom = i + '%';
setValueById('ozoom',Math.round(i) + '%');
}
}
function Home(obj)
{
this.OBJ = obj;
this.GuestBookAdd=function()
{
var c_regID=getValueById('txtLoginRegisterId');
var c_PostType=getValueById('txtGuestBookPostType');
if(c_PostType!="0")
{
if(c_regID=="0")
{
alert('该留言已设置只有注册会员可以!请登录之后再留言!');
return ;
}
}
var returnValue=this.OBJ.guestBookAdd(getValueById('txtRegisterId'),getValueById('txtContent'),getValueById('txtNiceName')).value;
if(returnValue!=true)
{
alert('留言失败!请稍后再试!');
return ;
}
alert('留言成功!');
window.document.location.reload();
}
this.DeleteGuest=function(id)
{
var returnValue=this.OBJ.deleteGuest(id).value;
if(returnValue!=true)
{
alert('删除失败!请稍后再试!');
return;
}
alert('删除成功!');
window.document.location.reload();
}
this.getRePostPanel=function(id)
{
var obj=document.getElementById("txtRePanel_"+id);
obj.style.display='';
}
this.RePostGuest=function(id)
{
var returnValue=this.OBJ.rePostGuest(id,getValueById("txtRePost_"+id)).value;
if(returnValue!=true)
{
alert('回复失败!请稍后再试!');
return;
}
alert('回复成功!');
window.document.location.reload();
}
this.CommentPost=function()
{
var c_regID=getValueById('txtCommentRegisterID');
var c_PostType=getValueById('txtCommentPostType');
if(c_PostType!="0")
{
if(c_regID=="0")
{
alert('该评论已设置只有注册会员可以!请登录之后再评论!');
return ;
}
}
var returnValue=this.OBJ.commentPost(getValueById('txtRegisterID'),getValueById('txtItemID'),c_regID,getValueById('txtSortType'),getValueById('txtContent')).value;
if(returnValue!=true)
{
alert("评论失败!请稍后再试!");
return;
}
alert('评论成功!');
setValueById('txtContent','');
setValueById('c_count',Number(getValueById('c_count'))+1);
this.CommentLoad(getValueById('txtSortType'),getValueById('txtRegisterID'),getValueById('txtItemID'));
}
this.DeleteComment=function(id)
{
var returnValue=this.OBJ.deleteComment(id).value;
if(returnValue!=true)
{
alert('删除失败!请稍后再试!');
return;
}
alert('删除成功!');
setValueById('c_count',Number(getValueById('c_count'))-1);
this.CommentLoad(getValueById('txtSortType'),getValueById('txtRegisterID'),getValueById('txtItemID'));
}
this.CommentLoad=function(sortType,registerId,itemID)
{
setInnerHtmlById('com_Content',getHttpHtml(ServerPath+'home/skin/Comment.aspx?SortType='+sortType+'&RegisterId='+registerId+'&ItemID='+itemID+'&cacheid='+Math.random()));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -