求QQ相册代码。

ji_ju 2009-09-14 11:35:31
asp.net怎样实现QQ相册的效果?就是从数据库里面得到照片的路径,然后在相册的上头显示所有的图片,并且可以左右滚动,在下面查看的时候默认显示一张图,点击某一张的时候在下面显示出来,多谢高手帮忙啊!


我邮箱:84428173@qq.com 谢谢
...全文
2471 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
gzadsl 2011-06-19
  • 打赏
  • 举报
回复
我也想要这个代码,有完整的代码下载吗?
HackeHe 2009-10-09
  • 打赏
  • 举报
回复
用js 代码实现的
HackeHe 2009-10-09
  • 打赏
  • 举报
回复
有在JAVA里面做的嘛?
QQ空间这种
ji_ju 2009-09-17
  • 打赏
  • 举报
回复
期待好的答案中。。。。。。。。。。。。
baoxuetianxia 2009-09-15
  • 打赏
  • 举报
回复
呵呵。不知道,但是帮你顶下。呵呵 晚上不容易啊。我啊
wanghui0380 2009-09-15
  • 打赏
  • 举报
回复
直接下jquery的插件ad-gallery就是,demo及下载地址
http://coffeescripter.com/code/ad-gallery/
ji_ju 2009-09-15
  • 打赏
  • 举报
回复
发个样子过来 我看看是我要不是?[Quote=引用 4 楼 ws_hgo 的回复:]
HTML code<%@ Page Language="C#"%><%@ Register Src="top.ascx" TagName="top" TagPrefix="uc1"%><%@ Register Src="a1.ascx" TagName="a1" TagPrefix="uc2"%><%@ Register Src="right.ascx" TagName="right" TagPr¡­
[/Quote]
ws_hgo 2009-09-15
  • 打赏
  • 举报
回复
    <div>  
<table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle"><table width="990" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td valign="top"><uc1:top id="Top1" runat="server">
</uc1:top></td>
</tr>
<tr>
<td height="7" valign="top">
</td>
</tr>
<tr>
<td align="center" valign="top"><table width="970" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="344" height="156" align="center" valign="middle" class="k"><img src="img/b02.jpg" mce_src="img/b02.jpg" width="340" height="152"></td>
<td align="right" valign="middle"><table width="614" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="156" align="center" valign="middle" class="k"><img src="img/b01.jpg" mce_src="img/b01.jpg" width="609" height="152"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="7"></td>
</tr>
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="180" height="150" valign="top" bgcolor="#F9F9F9">
<uc2:a1 id="A1_1" runat="server">
</uc2:a1></td>
<td valign="top"><table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td height="28" bgcolor="EEEEEE"> </td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" class="font06">+ <%=CateName%></td>
</tr>
<tr>
<td align="left" valign="top" style="height: 265px">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td align="center" height="40"><b> <%=Product.Title%><b></td></tr>

<tr><td align="center"><img src="<%=Product.PictureUrl %>" width="445" height="335" onload="javascript:DrawImage(this,445,335);"></td>
</tr>
<tr><td align="center"> </td></tr>
<tr><td valign="top"><%=Server.HtmlDecode(Product.Content)%></td></tr>
<tr align="center">
<td>
<asp:Label ID="LinkPrev" runat="server" Text="Label"><a href="CaseDetail.aspx?id=<%=PurviveID%>">上一页</a></asp:Label>
<asp:Label ID="Lab1" runat="server" Text="Label" Visible="false"></asp:Label>
<asp:Label ID="LinkNext" runat="server" Text="Label"><a href="CaseDetail.aspx?id=<%=NextID%>">下一页</a></asp:Label>
<asp:Label ID="Lab2" runat="server" Text="Label" Visible="false"></asp:Label>
<%=CateName %>共有:<asp:Label ID="LabCount" runat="server" Text=""><%=Count %></asp:Label>条信息
</td>
</tr>

</table>
</td>
</tr>

</table></td>
<td width="200" valign="top">
<uc3:right id="Right1" runat="server">
</uc3:right></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>

<tr>
<td valign="top"> <uc4:bottom id="Bottom1" runat="server">
</uc4:bottom></td>
</tr>
</table></td>
</tr>
</table>
</div>
</form>
</body>
</html>


本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/ws_hgo/archive/2009/03/31/4039049.aspx
ws_hgo 2009-09-15
  • 打赏
  • 举报
回复
<%@ Page Language="C#" %>  

<%@ Register Src="top.ascx" TagName="top" TagPrefix="uc1" %>
<%@ Register Src="a1.ascx" TagName="a1" TagPrefix="uc2" %>
<%@ Register Src="right.ascx" TagName="right" TagPrefix="uc3" %>
<%@ Register Src="bottom.ascx" TagName="bottom" TagPrefix="uc4" %>

<mce:script runat="server"><!--
BJProduct Product = new BJProduct();
ArrayList MyArray = new ArrayList();
int ParentID;
//总产品数量
int Count = 0;
//前一个产品的ID
int PurviveID;
//下一个产品的ID
int NextID;
//当前产品ID
int id;
//最后一个产品的ID
int LastID;
//父类标题
protected string CateName = "";
BJProductCategory Category = new BJProductCategory();
protected void Page_Load(object sender, EventArgs e)
{
id = FormUtil.GetQueryInt("ID");
if (id != int.MinValue)
{
Product.ID = id;
}
WebManager.GetInfo(Product);
ParentID = Product.ParentID;
Category.ID = ParentID;
WebManager.GetInfo(Category);
CateName = Category.Title;
ShowCategory();

}
protected void ShowCategory()
{
Product.ParentID = ParentID;
//得出所有的该产品分类的信息
DataTable dt = WebManager.List(Product, "", "[ID],[Title]", "&parentid=", "[OrderNo]");
if (dt.Rows.Count > 0)
{
//总记录数
Count = dt.Rows.Count;
//将ID插入到Myarray数值中
for (int i = 0; i < dt.Rows.Count; i++)
{
MyArray.Add(dt.Rows[i][0]);
}
//找到最后一个产品的ID号
LastID = int.Parse(dt.Rows[Count - 1][0].ToString());
}
if (MyArray.Contains(id))
{
//得到当前ID的索引号
int aa = MyArray.BinarySearch(id);
//对应该产品分类中第一张图片的ID
int Col = int.Parse(MyArray[0].ToString());
// 如果当前ID为第一张图片的话,上一页去掉超链接,变为文本类型
if (Col == id)
{
PurviveID = id;
NextID = int.Parse(MyArray[1].ToString());
// LinkPrev.Visible = false;
LinkPrev.Enabled = false;
LinkPrev.Visible = false;
Lab1.Visible = true;
Lab1.Text = "上一页";
//Label Lab=new Label
}
//既不是第一张图片ID,也不是最后一张,就把文本类型的Lab去掉
else if (LastID == id)
{
PurviveID = int.Parse(MyArray[aa - 1].ToString());
NextID = id;

LinkNext.Enabled = false;
LinkNext.Visible = false;
Lab2.Visible = true;
Lab2.Text = "下一页";

}
// 如果当前ID为最后一张图片的话,下一页去掉超链接,变为文本类型
else
{

PurviveID = int.Parse(MyArray[aa - 1].ToString());
NextID = int.Parse(MyArray[aa + 1].ToString());
LinkPrev.Enabled = true;
LinkNext.Enabled = true;
Lab1.Visible = false;
Lab2.Visible = false;
}
}

}
// --></mce:script>

<html >
<head id="Head1" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>武汉唐盛装饰工程有限公司</title>
<mce:style type="text/css"><!--
body,td,th {
font-size: 12px;
}
body {
margin:auto;
background-image: url(images/fondo-gris.gif);
}
.middle-demo-1{
height: 4em;
line-height: 4em;
overflow: hidden;
}
--></mce:style><style type="text/css" mce_bogus="1">body,td,th {
font-size: 12px;
}
body {
margin:auto;
background-image: url(images/fondo-gris.gif);
}
.middle-demo-1{
height: 4em;
line-height: 4em;
overflow: hidden;
}</style>
<link href="css/style.css" mce_href="css/style.css" rel="stylesheet" type="text/css"/>
<mce:script language="JavaScript"><!--

var k=0; //声明一个计数器变量
var imgname1="img/"; //所有图片地址的前面相同的部分,要根据实际修改这个值。
var imgname2=".jpg"; //图片的文件格式,可根据实际情修改,前面那个小点不要漏了。
var imgnub=4; //要展示的图片的张数,根据实际修改此值。
function start(){ //程序主体部分
obj=eval("img1"); //若图像标记的ID号改变,请修改括号中的字符串值。
if (obj.filters.item(0).Transition==23) // 这部分语句是用于改变切换样式,在23种样式中循环。
obj.filters.item(0).Transition=1;
else
obj.filters.item(0).transition++;
obj.filters.item(0).Apply();
if (k<imgnub) {k++; //这部分语句用于改变图像标记的src的图片地址(既含路径的文件名)。
}else {k=1;
}
obj.src=imgname1+k+imgname2;
obj.filters.item(0).Play();
setTimeout("start(1)",2500); //每三秒钟刷新一次。
}
// --></mce:script>
<mce:script type="text/javascript"><!--
function DrawImage(ImgD,FitWidth,FitHeight)
{
var image=new Image();
image.src=ImgD.src;
if(image.width>0 && image.height>0)
{
if(image.width/image.height>= FitWidth/FitHeight)
{
if(image.width>FitWidth)
{
ImgD.width=FitWidth;
ImgD.height=(image.height*FitWidth)/image.width;
}
else
{
ImgD.width=image.width;
ImgD.height=image.height;
}
}
else
{
if(image.height>FitHeight)
{
ImgD.height=FitHeight;
ImgD.width=(image.width*FitHeight)/image.height;
}
else
{
ImgD.width=image.width;
ImgD.height=image.height;
}
}
}
}
// --></mce:script>
</head>
<body>
<form id="form1" runat="server">
wiki14 2009-09-15
  • 打赏
  • 举报
回复
missukiss02 2009-09-15
  • 打赏
  • 举报
回复
帮你顶吧。。
feixian49 2009-09-15
  • 打赏
  • 举报
回复
帮顶
ji_ju 2009-09-15
  • 打赏
  • 举报
回复
这么复杂啊,有简单的吗?[Quote=引用 3 楼 wiki14 的回复:]
http://www.cnblogs.com/Tonyyang/archive/2009/04/13/1322688.html

研究研究。
[/Quote]
ji_ju 2009-09-15
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 wanghui0380 的回复:]
直接下jquery的插件ad-gallery就是,demo及下载地址
http://coffeescripter.com/code/ad-gallery/
[/Quote]

我试过 可是在IE7里 &('.ad-gallery').adgallery()这个调用提示js运行错误 &('.ad-gallery').adgallery() 好象是调用不了,但是在火狐里是正常的

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧