zoukankan      html  css  js  c++  java
  • input 就是直接在value身上设置 使用jsp的时候

    前端的使用:

    <form id="postForm" action="${pageContext.request.contextPath}/uploadSpotImg" method="Post" enctype="multipart/form-data">
    			<table>
    				<tr>
    					标题
    				</tr>
    				<tr>
    				
    					<input  type="text" name="sTitle" value="${spot.sTitle} "/ >
    				</tr>
    				<tr>
    					简介
    				</tr>
    				<tr>
    					<input type="text" name="sInfo" value="${spot.sInfo} " / >
    				</tr>
    				<tr>
    					地区
    				</tr>
    				<tr>
    					
    					省<input name="rProvince" type="text" value=" ${spot.regionInfo.rProvince}"  />
    					市<input name="rCity" type="text" value="${spot.regionInfo.rCity}"  />
    					区<input name="rArea" type="text"  value="${spot.regionInfo.rArea}" />
    					 详细<input name="rInfo" type="text" value="${spot.regionInfo.rInfo}"  />
    				</tr>
    				
    				<tr>
    				图片
    				</tr>
    				
    				<tr>
    				<input name="img1" type="file" value="${spot.sImg}" />
    				</tr>
    				
    				<tr>
    				<input name="img2" type="file" value="" />
    				</tr>
    				<tr>
    				<input name="img3" type="file" value="" />
    				</tr>
    				<tr>
    				<input id="upload" type="submit" value="提交" />
    				</tr>
    			</table>
    		</form>
    

     后台的关联:

    	@Autowired
    	SpotService spotService;
    	@Autowired
    	RegionInfoService regionInfoService;
    	// 景点模块
    	@RequestMapping("/spotModule")
    	public String spotModule(HttpServletRequest request, HttpServletResponse resp) {
    		request.setAttribute("spots", spotService.all());
    
    		return "spotModule";
    	}
    

     给value设置就是直接给赋值

  • 相关阅读:
    css3 3d 转换
    css3 动画序列
    css3 动画
    2d 转换之缩放
    2d 转换中心点
    css3 书写 动画三角形
    2d 旋转
    2D转换
    伪元素 字体图标
    风陵01
  • 原文地址:https://www.cnblogs.com/xiaoniuniu886/p/9002696.html
Copyright © 2011-2022 走看看