87,907
社区成员
发帖
与我相关
我的任务
分享
<script language="javascript" type="text/javascript">
function myfun()
{
var strOne = document.getElementById("TextBox1").value;
var strTwo = document.getElementById("TextBox2").value;
var strThree = strOne * strTwo;
document.getElementById("TextBox3").value = strThree;
}
</script>
<body>
<form id="Form1" method="post" runat="server">
<INPUT id="TextBox1" type="text" value="0" name="TextBox1">
<INPUT id="TextBox2" value="0" type="text" >
<INPUT id="TextBox3" type="text" name="Text1" onfocus="myfun()" value="正确输入单价 数量请点击">
</form>
</body>