日期:2014-05-16 浏览次数:20370 次
<%@ page contentType="text/html;charset=UTF-8" trimDirectiveWhitespaces="true" import="java.io.*,java.util.*"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>
<html id="htmlObject">
<head>
<title>123</title>
<%@ include file="/common/resource.jsp"%>
<script type="text/javascript">
$(document).ready(function(){
htmlTest();
});
function htmlTest() {
alert($("#valiSource").html());
}
function languageSelecter_onChanged(control) {
$control=$(control);
$form = $("#form-login");
$.post($control.attr("href"), $form.serialize(), function(html) {
//修改ajax加载为局部form-login加载,避免整个html中head部分文件资源重加载
$html=$(html);
//alert(html);
alert($html.find("#valiSource").html());
$("#divForm").html($html.find("#divForm").html());
//$("body").html(html);
$form.validationEngine({
autoPositionUpdate:true,
focusFirstField:true,
scroll:true
});
});
return false;
}
</script>
</head>
<body>
<form id="form-login" action="login!login.action" successAction="index.action" method="post">
<div id="divForm" align="center">
<div id="valiSource">
aaa
<script src="${ctx}/static/jquery-Validation-Engine/js/languages/jquery.validationEngine-${sessionScope.WW_TRANS_I18N_LOCALE}.js" type="text/javascript"></script>
</div>
<div style="width:350px" class="well">
<div class="control-group">
<span id="errorMessage" class="error">
<s:property value="successErrorForm.errorMessage"></s:property>
</span>
</div>
<div class="control-group">
<span class="span1"><s:text name="label.login.name" /></span>
<s:textfield id="name" name="user.name" cssClass="validate[required]" />
</div>
<div class="control-group">
<span class="span1"><s:text name="label.login.password" /></span>
<s:password id="password" name="user.password" cssClass="validate[required]"/>
</div>
<div class="control-group">
<span class="span1"><s:text name="label.login.language" /></span>
<s:set name="SESSION_LOCALE" value="#session['WW_TRANS_I18N_LOCALE']"/>
<s:bean id="locales" name="com.wizarpos.tms.common.language.LanguageSelectList">
<s:param name="current" value="#SESSION_LOCALE == null ? locale : #SESSION_LOCALE"/>
</s:bean>
<s:select id="languageSelecter" href="login!changeLanguage.action" list="#locales.locales" listKey="value" listValue="key" value="#SESSION_LOCALE == null ? locale : #SESSION_LOCALE" name="request_locale" onchange="languageSelecter_onChanged(this)"/>
</div>
<div class="control-group">
<button type="submit" class="btn btn-primary">
<s:text name="label.login.login" />