html - Render an HTML <html> Element
Renders an HTML <html> element with language attributes extracted from the user's current Locale object, if there is one.
Attribute Name Description
lang Since: Struts 1.2Renders a lang attribute with the locale stored in the user's session. If not found in the session, the language from the Accept-Language HTTP header is used. If still not found, the default language for the server is used. (RT EXPR)
locale DEPRECATED: Creating a session is undesirable for apps that don't support them. Use the lang attribute to acheive the same functionality without creating a session. Set to true in order to store a Locale in the session based on the current request's Accept-Language header (if any) if none has currently been set. This attribute will create a session if one does not already exist. The lang attribute is rendered with the appropriate language code.(RT EXPR)
xhtml Since: Struts 1.1Set to true in order to render xml:lang and xmlns attributes on the generated html element. This also causes all other html tags to render as xhtml. (RT EXPR)
Renders an HTML <html> element with language attributes extracted from the user's current Locale object, if there is one.
Attribute Name Description
lang Since: Struts 1.2Renders a lang attribute with the locale stored in the user's session. If not found in the session, the language from the Accept-Language HTTP header is used. If still not found, the default language for the server is used. (RT EXPR)
locale DEPRECATED: Creating a session is undesirable for apps that don't support them. Use the lang attribute to acheive the same functionality without creating a session. Set to true in order to store a Locale in the session based on the current request's Accept-Language header (if any) if none has currently been set. This attribute will create a session if one does not already exist. The lang attribute is rendered with the appropriate language code.(RT EXPR)
xhtml Since: Struts 1.1Set to true in order to render xml:lang and xmlns attributes on the generated html element. This also causes all other html tags to render as xhtml. (RT EXPR)
建议楼主先明白html中的
<input type="button">和<input type="submit">的区别
if (Trim(jpsw) != Trim("${commVar.PASSWORD}"))trim应该是jpsw.trim()吧??
问题2:
img我一般是这样用的
<img src="<bean:write name="imgForm" src="imgSrc">">
问题3:
这个更简单
<frame name="BottomFrame" src="sq_bottom.do" scrolling="auto">
看明白了吗?
if (Trim(jpsw) != Trim("${commVar.PASSWORD}"))trim应该是jpsw.trim()吧??
======================================
这些是没错误的,我写了这样的方法的,不用关心这个的,我只是问为什么<html:button >的时候就出错??
<html:button value="确 定" property="submit" onclick="javascript: return compare();" />
<script language="javascript">
function compare()
{
var pswchk = document.pswForm;
var jpsw = pswchk.jpsw.value;
if (Trim(jpsw) != Trim("${commVar.PASSWORD}"))
{
alert("旧口令输入错误!");
pswchk.jpsw.focus();
return false;
} pswchk.submit();
}
</script>
<%@ page contentType="text/html; charset=GBK" isELIgnored="false"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %><bean:define id="commVar" name="CommonVar" scope="session" type="com.jtpsoft.gjjmx.CommonVar" />
<bean:define id="CurrentDwxx" name="CurrentDwxx" scope="session" type="com.jtpsoft.gjjmx.CurrentDwxx" /><html>
<head>
<title>
kl
</title>
<LINK REL="stylesheet" type="text/css" href="../../css/jtpsoft.css"/>
<script language="JavaScript" src="../../script/swapimage.js"></script>
<script language="JavaScript" src="../../script/String.js"></script>
<script language="javascript">
function window_onload()
{
var pswchk = document.pswForm;
pswchk.user.value = "${commVar.USER}";
pswchk.user.style.backgroundColor = "#C0C0C0";
pswchk.user.readOnly = true;
}
function doreset()
{
top.MainFrame.location.href = "index.jsp";
}
function compare()
{
var pswchk = document.pswForm;
var jpsw = pswchk.jpsw.value;
if (Trim(jpsw) != Trim("${commVar.PASSWORD}"))
{
alert("旧口令输入错误!");
pswchk.jpsw.focus();
return false;
} pswchk.submit();
}
</script>
</head>
<body leftmargin="0" topmargin="0" onload="window_onload()">
<font color="red">
<html:errors />
</font>
<html:form action="pswchg.do" >
<table>
<tr><td colspan="2" align="center" height="50"> 用户名称 <html:text property="user" /></td></tr>
<tr><td colspan="2" align="center" height="50">输入旧口令<html:password property="jpsw"/></td></tr>
<tr><td colspan="2" align="center" height="50">输入新口令<html:password property="xpsw1"/><br>
<font color="green">1、口令长度至少6位;2、使用字母与数字的组合</font>
</td></tr>
<tr><td colspan="2" align="center" height="50">重复新口令<html:password property="xpsw2"/></td></tr>
<tr>
<tr><td align="center">
<html:button value="确 定" property="submit" onclick="javascript: return compare();" />
</td>
<td align="center"><html:reset value="重 置" onclick= "doreset()"/></td></tr>
</tr>
</table>
</html:form>
[DEBUG] 08:58:15.188 Looking for ActionForm bean instance in scope 'request' un
der attribute key 'pswForm'
[DEBUG] 08:58:15.188 Creating new ActionForm instance of type 'com.jtpsoft.gjjm
x.actionform.PswForm'
[DEBUG] 08:58:15.188 --> com.jtpsoft.gjjmx.actionform.PswForm@dc4c81