<TR><TD style="WIDTH: 67px; HEIGHT: 4px"><FONT face="宋体"><FONT face="宋体">月租费:</FONT></FONT></TD>
<TD style="WIDTH: 294px; HEIGHT: 4px"><FONT face="宋体"><FONT face="宋体"><asp:TextBox id="monFareTextBox" runat="server" Width="160px" AutoPostBack="True"></asp:TextBox>元*</FONT></FONT></TD>
<TD style="WIDTH: 62px; HEIGHT: 4px"><FONT face="宋体">优惠率:</FONT></TD>
<TD style="HEIGHT: 4px"><FONT face="宋体"><FONT face="宋体"><asp:TextBox id="favourateTextBox" runat="server" Width="100px"></asp:TextBox>%<asp:RegularExpressionValidator id="RegularExpressionValidator1" runat="server" ValidationExpression="^[0-9]+(.[0-9]{0-3})?$" ControlToValidate="favourateTextBox" ErrorMessage="优惠率格式输入有误"></asp:RegularExpressionValidator></FONT></FONT></TD></TR>
<TR>
<TD style="WIDTH: 67px; HEIGHT: 13px"><FONT face="宋体"><FONT face="宋体">租用数量:</FONT></FONT></TD>
<TD style="WIDTH: 294px; HEIGHT: 13px"><FONT face="宋体"><FONT face="宋体">
<asp:TextBox id="hireAmountTextBox" runat="server" Width="160px" AutoPostBack="True"></asp:TextBox>* </FONT></FONT></TD>
<TD style="WIDTH: 62px; HEIGHT: 13px"><FONT face="宋体">年租费:</FONT></TD>
<TD style="HEIGHT: 13px"><FONT face="宋体"><FONT face="宋体">
<asp:TextBox id="yearFareTextBox" runat="server" Width="160px" ReadOnly="True"></asp:TextBox>万元</FONT></FONT></TD>
</TR>当我输入月租费,租用数量,优惠率,我要得出年租费:月租费*租用数量*12/10000*优惠率
但是我是用的服务器空间,要多次回返,我发现这可以在客户断直接完成,想请教各位高手,怎么用javascript完成,我是菜鸟??
<TD style="WIDTH: 294px; HEIGHT: 4px"><FONT face="宋体"><FONT face="宋体"><asp:TextBox id="monFareTextBox" runat="server" Width="160px" AutoPostBack="True"></asp:TextBox>元*</FONT></FONT></TD>
<TD style="WIDTH: 62px; HEIGHT: 4px"><FONT face="宋体">优惠率:</FONT></TD>
<TD style="HEIGHT: 4px"><FONT face="宋体"><FONT face="宋体"><asp:TextBox id="favourateTextBox" runat="server" Width="100px"></asp:TextBox>%<asp:RegularExpressionValidator id="RegularExpressionValidator1" runat="server" ValidationExpression="^[0-9]+(.[0-9]{0-3})?$" ControlToValidate="favourateTextBox" ErrorMessage="优惠率格式输入有误"></asp:RegularExpressionValidator></FONT></FONT></TD></TR>
<TR>
<TD style="WIDTH: 67px; HEIGHT: 13px"><FONT face="宋体"><FONT face="宋体">租用数量:</FONT></FONT></TD>
<TD style="WIDTH: 294px; HEIGHT: 13px"><FONT face="宋体"><FONT face="宋体">
<asp:TextBox id="hireAmountTextBox" runat="server" Width="160px" AutoPostBack="True"></asp:TextBox>* </FONT></FONT></TD>
<TD style="WIDTH: 62px; HEIGHT: 13px"><FONT face="宋体">年租费:</FONT></TD>
<TD style="HEIGHT: 13px"><FONT face="宋体"><FONT face="宋体">
<asp:TextBox id="yearFareTextBox" runat="server" Width="160px" ReadOnly="True"></asp:TextBox>万元</FONT></FONT></TD>
</TR>当我输入月租费,租用数量,优惠率,我要得出年租费:月租费*租用数量*12/10000*优惠率
但是我是用的服务器空间,要多次回返,我发现这可以在客户断直接完成,想请教各位高手,怎么用javascript完成,我是菜鸟??
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script id="clientEventHandlersJS" language="javascript">
<!--
function js()
{
var nzf1=yz.value*sl.value*12/10000*yhl.value;
nzf.value=nzf1;
}
//-->
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<table style="WIDTH: 584px; HEIGHT: 94px">
<TR>
<TD style="WIDTH: 67px; HEIGHT: 4px"><FONT face="宋体"><FONT face="宋体">月租费:</FONT></FONT></TD>
<TD style="WIDTH: 294px; HEIGHT: 4px"><FONT face="宋体"><FONT face="宋体"><INPUT id="yz" type="text">元*</FONT></FONT></TD>
<TD style="WIDTH: 62px; HEIGHT: 4px"><FONT face="宋体">优惠率:</FONT></TD>
<TD style="HEIGHT: 4px"><FONT face="宋体"><FONT face="宋体">%<INPUT id="yhl" type="text"></FONT></FONT></TD>
</TR>
<TR>
<TD style="WIDTH: 67px; HEIGHT: 13px"><FONT face="宋体"><FONT face="宋体">租用数量:</FONT></FONT></TD>
<TD style="WIDTH: 294px; HEIGHT: 13px"><FONT face="宋体"><FONT face="宋体"><INPUT id="sl" type="text">* </FONT></FONT></TD>
<TD style="WIDTH: 62px; HEIGHT: 13px"><FONT face="宋体">年租费:</FONT></TD>
<TD style="HEIGHT: 13px"><FONT face="宋体"><FONT face="宋体"><INPUT id="nzf" type="text">万元</FONT></FONT></TD>
</TR>
</table>
<INPUT type="button" value="Button" onclick="js()">
</body>
</HTML>