neil1225 2016-06-01 09:16 采纳率: 0%
浏览 1991

怎么写cas中js登录验证呀?

 <form:form  method="post" id="theForm" commandName="${commandName}"  htmlEscape="true">
            <div class="user_yh">
                用户登录
            </div>
           <section class="row">
                <section class="row_name">
            <label for="username"><spring:message code="screen.welcome.label.netid" /></label>
                <c:choose>
                    <c:when test="${not empty sessionScope.openIdLocalId}">
                        <strong><c:out value="${sessionScope.openIdLocalId}" /></strong>
                        <input class="row_name1"  id="username" name="username" value="<c:out value="${sessionScope.openIdLocalId}" />"  />
                    </c:when>
                    <c:otherwise>
                        <spring:message code="screen.welcome.label.netid.accesskey" var="userNameAccessKey" />
                        <form:input cssClass="required" cssErrorClass="error" id="username" size="25" tabindex="1" accesskey="${userNameAccessKey}" path="username" autocomplete="off" htmlEscape="true"  style="background-color: #f2f2f2;"/>
                    </c:otherwise>
            </c:choose>
            </section>
        </section>
         <section class="row">
         <section class="row_pw">
            <label for="password"><spring:message code="screen.welcome.label.password" /></label>
             <c:choose>
                    <c:when test="${not empty sessionScope.openIdLocalId}">
                        <strong><c:out value="${sessionScope.openIdLocalId}" /></strong>
                        <input   id="password" name="password" value="<c:out value="${sessionScope.openIdLocalId}" />"  />
                    </c:when>
                    <c:otherwise>
                        <spring:message code="screen.welcome.label.netid.accesskey" var="passwordAccessKey" />
                        <form:password cssClass="required" cssErrorClass="error" id="password" size="25" tabindex="1" accesskey="${passwordAccessKey}" path="password" autocomplete="off" htmlEscape="true"  style="background-color: #f2f2f2;"/>
                         <span id="capslock-on" style="display:none;"><p><img src="images/warning.png" valign="top"> <spring:message code="screen.capslock.on" /></p></span>
                    </c:otherwise>
            </c:choose>
            </section>
        </section>
       <div class="set-button">
                <span class="loginspan2"><input type="checkbox" name="fname" id="fname" /> </span>
                <label class="loginspan1"  for="fname">记住密码</label>
                <a href="$!webPath/forget.htm" target="_black">忘记密码?</a>
            </div>
        <form:errors path="*" id="msg"  cssClass="errors" class="errors" element="div" htmlEscape="false" />
         <section class="row btn-row">
            <input type="hidden" name="lt" value="${loginTicket}" />
              <input type="hidden" name="execution" value="${flowExecutionKey}" />
            <input type="hidden" name="_eventId" value="submit" />

            <input class="btn-submit" name="submit" accesskey="l"  onclick="sublogin()" value="点击登录"  tabindex="6" type="submit" style="font-size:18px;width:376px;height:50px";font-family: "微软雅黑"; />

        </section>

    </form:form>
    这是源码,怎么写一个js验证,跳转到:http:localhost/8080/hzys/a.htm
  • 写回答

2条回答 默认 最新

  • cbaxt 2016-06-01 10:13
    关注

    1、使用种方式来访问的sso登录后自然跳转到指定页
      http://你的SSO地址.com&service?http:localhost/8080/hzys/a.htm

    2、改造你的SSO使用ajax登录,成功后跳转到指定页

    评论

报告相同问题?

悬赏问题

  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题