将客户端控件访问服务器端以进行c#编码; [英] Acces client side controls to server side for c# coding;
问题描述
朋友们,我想在服务器端使用t1,t2,t3控件进行进一步的编码.
反之亦然
HI friends,i want the t1,t2,t3 controls in server side for further coding.
Also viceversa
< 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">
<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"/>
<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>
</form>
</body>
</html>
推荐答案
hi ..
对每个控件使用runat ="server"属性
hi..
use runat="server" property for each control
这篇关于将客户端控件访问服务器端以进行c#编码;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!