jsp

3
要隐藏的话加个DIV
<div style="display:none;"><a title="查看公司" class="a_company" href="actions/userAction!toCompany?user.userId=${user.userId}">公司信息</a></div>

<c:forEach var="it" items="${items}">
<option value="${it}">第${it }项</option>
</c:forEach>
4
for(User user : users){
System.out.println(user.getName());//获取用户名
System.out.println(user.getPassWord());//获取密码
}

5
// 次资讯后跳转到次资讯列表,url加上id
String parentId = request.getParameter( "parentId" );
if( StringUtils.isNotEmpty( parentId ) ) {
return "redirect:/mallAdmin/brandNews/newsList?parentId=" + parentId;
}
return "redirect:/mallAdmin/brandNews/newsList";(重定向)


<c:choose>
<c:when test="${bean.dataType == 2 }">
<c:if test="${bean.status==0}">
<a href="${ctx}/mallAdmin/brandNews/check/${bean.id}/1?parentId=${parentId}"> <img
src="${ctx}/images/acct/audit.jpg" alt="审核通过" width="20"
height="20" title="审核通过" />
</a>
<a href="${ctx}/mallAdmin/brandNews/check/${bean.id}/2?parentId=${parentId}"> <img
alt="" src="${ctx}/images/acct/shenhe.jpg" width="20"
height="20" title="审核不通过">
</a>
</c:if>
</c:when>
<c:otherwise>
<c:if test="${bean.status==0}">
<a href="${ctx}/mallAdmin/brandNews/check/${bean.id}/1"> <img
src="${ctx}/images/acct/audit.jpg" alt="审核通过" width="20"
height="20" title="审核通过" />
</a>
<a href="${ctx}/mallAdmin/brandNews/check/${bean.id}/2"> <img
alt="" src="${ctx}/images/acct/shenhe.jpg" width="20"
height="20" title="审核不通过">
</a>
</c:if>
</c:otherwise>
</c:choose>


7
图片显示goodsconsult,,sellaftercomtroller有web/front文件夹下的

一步:数据库加一个条件
<if test="displayNo != null">
and display_no in (0,1)
</if>


// 查询商品图片
List<CommodityImg> imgs = new ArrayList<CommodityImg>();
Map<String, Object> map = new HashMap<String, Object>();

if( ids != null && ids.size() > 0 ) {
map.put( "list", ids );
map.put( "type", CommodityImg.MAIN_IMG_TYPE );
map.put( "displayNo", 0 );//二步:取第一张图片
imgs = commodityImgService.getCommodityImgs( map );
}
Map<Integer, String> imgsMap = new HashMap<Integer, String>();
if( imgs != null && imgs.size() > 0 ) {
for( CommodityImg commodityImg : imgs ) {
if( !StringUtil.empty( commodityImg.getImgPath() ) ) {
imgsMap.put( commodityImg.getCommodityId(), commodityImg.getImgPath() );

<a href="${ctx }/commodity/details/${bean.commodityId}" ><img src="${imgsMap[bean.commodityId]}" width="60" height="60" style="width:60px" /></a>


8
导入java-formatter.xml格式代码文件
1、windows-preferences-java-code style-formatter 2、editor-save actions


9

<a>标签添加提示信息
οnclick="{if(confirm('确定要删除记录吗?')){return true;}return false;}"
<a href='地址' οnclick="return confirm('删除后无法恢复,确定要删除吗')">删除</a>
alt标签实际上是网站上图片的文字提示。

10
图片懒加载
js,lazyLoad官网有方法

11
异步请求/同步请求
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值