如何验证Javascript中的文本框 [英] How to validate for Text box in Javascript
本文介绍了如何验证Javascript中的文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
Txtbox a和文本框B
我在A和b文本框中输入值,它会使用Javascript自动添加数据并在Textbox c中显示.
如何分配Javascript函数.
Hi all
Txtbox a And Text box B
i giving values in A and b text box, its automatically added the data and Shows in Textbox c using Javascript.
How to assign the Javascript function.
推荐答案
尝试一下
Try this
<script language="javascript" type="text/javascript">
function CalculateGPer()
{
var Form = document.frmReg;
var txt1= Form.txtBox1.value;
var txt2= Form.txtBox2.value;
var addition1= (Number(txt1)+Number(txt2));
if(!isNaN(Per) && Per!=Infinity)
{
Form.txtadd.value = addition1.toFixed(2);
}
return CheckZero()
}
</script>
谢谢
Ashish
Thanks
Ashish
您是否尝试过搜索 ^ ]?
永远不要懒于使用google..
--Amit
Have you tried searching Google[^]?
Never feel lazy to use google..
--Amit
这篇关于如何验证Javascript中的文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文