CHUAI

博客园 首页 新随笔 联系 订阅 管理

<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8"  pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>

<div class="row-singel">
  <div class="row">
     <div class="col-sm-5">

   <div class="form-group" style="margin-bottom:0px;">
          <label class="col-sm-4 control-label">IP地址</label>
            <c:choose>
               <c:when test="${empty source}"></c:when>

      <c:otherwise><c:set var="ipVal" value="${fn:split(source.ipAddr,'.')}" /></c:otherwise>
            </c:choose>

    <div class="col-sm-8 input-group input-group-sm" style="padding:0px 15px;">
      <input type="text" class="form-control" style="text-align:center;" maxlength="3" placeholder="必填" value="<c:choose>

        <c:when test="${empty source}"></c:when><c:otherwise>${ipVal[0]}</c:otherwise></c:choose>" id="ipAddr_1">
                      <span class="input-group-addon ip-split">.</span>
              <input type="text" class="form-control" style="text-align:center;" maxlength="3" placeholder="必填" value="<c:choose>                      <c:when test="${empty source}"></c:when><c:otherwise>${ipVal[1]}</c:otherwise></c:choose>" id="ipAddr_2">
                       <span class="input-group-addon ip-split">.</span>
              <input type="text" class="form-control" style="text-align:center;" maxlength="3" placeholder="必填" value="<c:choose>                     <c:when test="${empty source}"></c:when><c:otherwise>${ipVal[2]}</c:otherwise></c:choose>" id="ipAddr_3">
                       <span class="input-group-addon ip-split">.</span>
              <input type="text" class="form-control" style="text-align:center;" maxlength="3" placeholder="必填" value="<c:choose>                     <c:when test="${empty source}"></c:when><c:otherwise>${ipVal[3]}</c:otherwise></c:choose>" id="ipAddr_4">
          </div>

      </div>

    <input type="hidden" name="ipAddr" id="ipAddr" maxlength="3" value="<c:choose><c:when test="${empty source}"></c:when>                                                 <c:otherwise>${source.ipAddr}</c:otherwise></c:choose>" />
     </div>
  </div>
</div>

posted on 2017-02-06 10:38  chuai  阅读(159)  评论(0)    收藏  举报