K9 通用版 博客版 主题版 地方门户版 企业版 |   企业(ASP) 分类 使用 分享 疑问 模板 建议 帮助 错误 其他
+新建主题 [Ajax]
填写帐号密码即可完成注册
+新建话题 最新回复排序 最新主题排序 精华帖子

多图上传功能,要生成图片列表在内容页展示

1Next >

fjlx 发表于:12-08-01 16:15 [添加收藏] 楼主 [回复] #Top#
fjlx 人气:20 积分:14 金币:170

多图上传功能,要生成图片列表在内容页展示,如何实现?


我自定义模型新建了这个字段--多(图片列表)

然后在新建成的模型里面也添加了内容。

在内容页模版里头也加了该字段。但是现实的时候,提示的是 Array

目的就是像实现类似于淘宝那样的多图展示功能。


这个要怎么实现,求解!


fjlx 发表于:12-08-01 16:30 沙发 [回复] #Top#
fjlx 人气:20 积分:14 金币:170
刚研究出来了。稍后我发布内容。大家可以借鉴http://d.lanrentuku.com/down/js/jiaodiantu-772/这个
我的代码如下


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="{king:keywords/}" />
<meta name="description" content="{king:description/}" />
<title>{king:title/}</title>
<link href="../images/style.css" rel="stylesheet" type="text/css" />
<link href="/css/css.css" type="text/css" rel="stylesheet">
<SCRIPT src="/js/jquery-1.2.6.pack.js" type=text/javascript></SCRIPT>
<SCRIPT src="/js/base.js" type=text/javascript></SCRIPT>
</head>
<body>
<div id=preview>
<div class=jqzoom id=spec-n1 ><IMG height=350
src="/{king:image/}" jqimg="/{king:image/}" width=350>
</div>
<div id=spec-n5>
<div class=control id=spec-left>
<img src="/images/left.gif" />
</div>
<div id=spec-list>
<ul class=list-h>
{king:_simg} <li><img src="/{king:image/}"> </li>{/king:_simg}
</ul>
</div>
<div class=control id=spec-right>
<img src="/images/right.gif" />
</div>

    </div>
</div>
<SCRIPT type=text/javascript>
$(function(){
  $(".jqzoom").jqueryzoom({
xzoom:400,
yzoom:400,
offset:10,
position:"right",
preload:1,
lens:1
});
$("#spec-list").jdMarquee({
deriction:"left",
width:350,
height:56,
step:2,
speed:4,
delay:10,
control:true,
_front:"#spec-right",
_back:"#spec-left"
});
$("#spec-list img").bind("mouseover",function(){
var src=$(this).attr("src");
$("#spec-n1 img").eq(0).attr({
src:src.replace("/n5/","/n1/"),
jqimg:src.replace("/n5/","/n0/")
});
$(this).css({
"border":"2px solid #ff6600",
"padding":"1px"
});
}).bind("mouseout",function(){
$(this).css({
"border":"1px solid #ccc",
"padding":"2px"
});
});
})
</SCRIPT>


<SCRIPT src="/js/lib.js" type=text/javascript></SCRIPT>
<SCRIPT src="/js/163css.js" type=text/javascript></SCRIPT>

</body>
</html>
fjlx 发表于:12-08-01 16:30 板凳 [回复] #Top#
fjlx 人气:20 积分:14 金币:170
比较粗糙。但是一个大致的内容已经形成了。其他的可以自己去修改样式。
ahao303 发表于:12-08-06 10:25 4楼 [回复] #Top#
ahao303 人气:152 积分:1877 金币:10882
KC元老
<div id=preview>
<div class=jqzoom id=spec-n1 ><IMG height=350
src="/{king:image/}" jqimg="/{king:image/}" width=350>
</div>
这个不是调用多图字段的吧,用缩略图那个字段吧

1Next >

发表回复

帐号 匿名发布 审核后可见 [加载完整在线编辑器]
内容
验证码
KingCMS 内容管理系统

关于我们 联系我们 广告报价 付款方式 站点导航

Copyright © 2004-2015 Focuznet All rights reserved.

广州唯众网络科技有限公司 粤ICP备08008106号