第一百一十天 how can I 坚持

  搞点有用的:

//javascript跳转

window.location.href

var basePath = "<%=basePath%>";

//包含页面(动态包含和静态包含)

<%@ include file="/base/global.jsp"%>

//jquery  ajax请求

$.ajax({

        url : basepath + "mobileUser/checkThirdOpen?thirdid="+ id,

        type : 'GET',

        dataType : "JSON",

        async:false,

        success : function(data) {

        error:function(){

                  layer.open({content: '连接服务器超时!,请稍后再试',btn: ['确定']});

            }

    });

//页面获取访问路径

<%

    String path = pageContext.getRequest().getServletContext().getContextPath();

    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

%>

//遍历获取input标签存入JavaScript数组

function getInputdata(div) {

        var data = {}, $t;

        div.find('input').each(function(){

            $t = $(this);

            data[$t.attr("name")] = $t.val();

            if($t.attr("paramName")) {

                data[$t.attr("name")+"paramName"] = $t.attr("paramName");

            }

        });

        return data;

    }

jstl forEach循环:    

<c:forEach items="${oc.otherConfigDetails}" var="detail">

    <dl>

        <dt class="f2">${detail.paramName }:</dt>

            <dd class="col-xs-8">

                <input type="${detail.paramType}" style="width: 100%; height: 100%;"

                    name="${oc.id}_${detail.paramValue}" paramName="${detail.paramName }">

            </dd>

    </dl>

</c:forEach>

jstl if语句:

<c:if test="${oc.validateType == '2'}">

    <dl>

        <dt class="f2">密码:</dt>

            <dd class="col-xs-8">

                <input type="password" style="width: 100%; height: 100%;" name="password">

            </dd>

    </dl>

</c:if>

<c:if test="${oc.validateType == '0' || oc.validateType == '3' }">

</c:if>

dl、dt、dd标签:

<dl> 

    <dt>标题1</dt> 

    <dd>列表1</dd> 

    <dd>列表2</dd> 

</dl> 

 

你可能感兴趣的:(ca)