accountadd.jsp

来自「EJB+Struts+Webservice实现的开放式基金管理系统」· JSP 代码 · 共 92 行

JSP
92
字号
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<script type="text/javascript">
function validatePrice(obj)
{
  //var obj = document.getElementById("price");
  var str = obj.value;
  if(str!=null)
  {
    var index = str.indexOf('.');
    if (index!=-1)
    {
      var decimal = str.substring(index+1,str.length);
      if(decimal.length > 2)
      {
        alert("价格最多只能有两位小数!");
        obj.focus();
        return false;
      }
    }
  }
}

	funtction clearFields()
	{
		document.getElementById("clientNo").value="";
		document.getElementById("financingAmount").value="";
		document.getElementById("password").value="";
		document.getElementById("cpassword").value="";
	}
</script><html:javascript formName="financialAccountForm"/>
<html:form styleId="financialAccountForm" action="accountAdd" onsubmit="return validateFinancialAccountForm(this)">
  <table border="0" width="100%">
    <tr>
      <td class="thd" colspan="2" align="center">
        <bean:message key="financialAccount.open"/>
      </td>
    </tr>
    <tr>
      <td class="tdata" colspan="2" align="center">&nbsp;</td>
    </tr>
    <tr>
      <td class="tdata" width="50%">
        <bean:message key="financialAccountDto.clientNo"/>
        <font color="red">*</font>
      </td>
      <td class="tdata" width="50%">
        <html:text styleClass="inputstyle" styleId="clientNo" property="financialAccountDto.clientNo"/>
      </td>
    </tr>
    <tr>
      <td class="tdata" width="50%">
        <bean:message key="financialAccountDto.financingAmount"/>
        <font color="red">*</font>
      </td>
      <td class="tdata" width="50%">
        <html:text styleClass="inputstyle" styleId="financingAmount" property="financialAccountDto.financingAmount" onblur="validatePrice(this)"/>
      </td>
    </tr>
    <tr>
      <td class="tdata" width="50%">
        <bean:message key="financialAccountDto.password"/>
        <font color="red">*</font>
      </td>
      <td class="tdata" width="50%">
        <html:password styleClass="inputstyle" styleId="password" property="financialAccountDto.password"/>
      </td>
    </tr>
    <tr>
      <td class="tdata" width="50%">
        <bean:message key="financialAccountDto.cPassword"/>
        <font color="red">*</font>
      </td>
      <td class="tdata" width="50%">
        <!--input class="inputstyle" type="password" name="cPassword"/-->
        <html:password styleClass="inputstyle" styleId="cpassword" property="cpassword"/>
      </td>
    </tr>
    <tr>
      <td class="tdata" colspan="2" align="center">
        <html:submit styleClass="btnaction">
          <bean:message key="button.add"/>
        </html:submit>
        <!-- html : reset styleClass="btnaction" >< bean:message key="button.reset"/ >< /html:reset -->

      <input type="button" name="clear" value="取消" class="btnaction" onClick="javascript:clearFields()">
      </td>
    </tr>
  </table>
</html:form>
<html:errors/>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?