本文介绍了如何在服务器端使用客户端文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI朋友们,请尝试下面的资源;我用于自动计算的javascript;
我想要服务器端的t1,t2,t3控件进行进一步的编码.
例如:我希望此t3值在按钮单击事件上标记;

HI friends,Try the source below;The javascript i used for automatic calculation;
i want the t1,t2,t3 controls in server side for further coding.
For eg:I want this t3 value to label on button click event;

报价:

< html xmlns ="http://www.w3.org/1999/xhtml">
< head runat ="server">
< script type ="text/javascript">
函数nims(){

var a = parseFloat(document.form1.t1.value);
var b = parseFloat(document.form1.t2.value);
var sum = a + b;
document.form1.t3.value = sum;
}
</script>

< title> </title>
</head>
< body>
< form id ="form1" runat ="server">

< input type ="text" value ="0" name ="t1" onkeyup ="nims();" />
< input type ="text" value ="0" name ="t2" onkeyup ="nims();"/>
<输入type ="text" value ="0" name ="t3"/>


</form>
</body>
</html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script type="text/javascript">
function nims() {

var a = parseFloat(document.form1.t1.value);
var b =parseFloat(document.form1.t2.value);
var sum = a + b;
document.form1.t3.value = sum;
}
</script>

<title> </title>
</head>
<body>
<form id="form1" runat="server">

<input type="text" value="0" name="t1" onkeyup="nims();" />
<input type="text" value="0" name="t2" onkeyup="nims();"/>
<input type="text" value="0" name="t3" />


</form>
</body>
</html>

推荐答案



这篇关于如何在服务器端使用客户端文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 06:46
查看更多