zoukankan      html  css  js  c++  java
  • 第一百一十天 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=" 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=" 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> 
  • 相关阅读:
    20000+关注,开源两本硬核的原创电子书!
    Tail Latency学习
    Zabbix5.0 监控redis
    JAVA多线程(九) ForkJoin框架
    JAVA多线程(八) Condition源码分析
    程序员英语学习(二) 标点符号对应的英语单词汇总
    linux shell快速入门
    Ubuntu常用指令和快捷键汇总
    Win10常用快捷键汇总
    算法路漫漫(三) 荷兰国旗
  • 原文地址:https://www.cnblogs.com/52-it/p/4665334.html
Copyright © 2011-2022 走看看