主题 : 文件下载id="attach${attach_index}"在js中怎么使用
级别: 白丁
UID: 60800
积分:6 加为好友
威望: 1 精华: 0
主题:1 回复:1
注册时间:2014-04-19
在线时长:0
1#   发表于:2014-04-28 08:54:08  IP:222.55.*.*
文件下载在myeclipse中写为:[#if content.attachments?size gt 0]
                [#list content.attachments as attach]
                <a id="attach${attach_index}" style="font-weight: bold">附件:${attach.name}</a>
                [/#list]
                [/#if]
在前台展示文件名可以正常下载。现在给下载增加了一个样式
<a id="attach${attach_index}" style="font-weight: bold"><button class="btn_down">下载资料</button></a>

下载资料这个按钮就无效了。需要给button添加一个onclick事件,这个事件怎么写才正确呢?直接写id="attach${attach_index}",系统不认识。求帮助。谢谢!
级别: 状元
UID: 33380
积分:50625 加为好友
威望: 21 精华: 3
主题:88 回复:30687
注册时间:2012-05-07
在线时长:0
2#   发表于:2014-04-28 09:10:35  IP:182.221.*.*
class="btn_down"写在style样式里看下
功成由勤,业精于勤。
1 共1页