|
发表于 2020-7-11 23:30:01
|
显示全部楼层
<script type="text/javascript">
function a()
{
var a=document.getElementById('TextBox1').value;
alert(a);
var b=document.getElementById('TextBox2').value;
alert(b);
var c=1-a-b;
alert(c);
document.getElementById('Label1').innerHTML=c;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server" Style="z-index: 100; left: 105px; position: absolute;
top: 112px"></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server" Style="z-index: 101; left: 104px; position: absolute;
top: 157px" onblur="a()"></asp:TextBox>
<asp:Label ID="Label1" runat="server" Style="z-index: 103; left: 107px; position: absolute;
top: 192px" Text="" ></asp:Label>
</div>
</form>
</body> |
|