且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将输入数组值传递给函数以计算不同的输入值

更新时间:2022-06-09 00:02:55

Susan Cranford写道:
Susan Cranford wrote:
请原谅,我已经看了这么多信息我无法弄清楚怎么把它放在一起即使我知道它必须相当简单。

我有一组输入文本框(txtDOBn),其中n是在
加载时创建的。在onchange事件中,我想计算年龄并在相邻的输入文本框中显示readonly和数组(每个DOB输入的年龄)。我打算使用vbscript
中的datediff函数进行计算。

有人可以帮我把各个部分拉到一起或指向一个类似的例子吗?
Please forgive, I have looked at so much info I can''t figure out how to
put it together even though I know it must be fairly simple.

I have an array of input text boxes (txtDOBn) where n is created at
load. On the onchange event I want to calc the age and show in adjacent
input text boxes that are readonly and also arrays (an age calced for
each DOB entered). I was going to use the datediff function in vbscript
to do the calc.

Can someone please help me pull the pieces together or point me to a
similiar example?




阅读J博士的页面:


< URL:http://www.merlyn.demon .co.uk / js-dates.htm>

-

Rob



Have a read of Dr J''s pages:

<URL:http://www.merlyn.demon.co.uk/js-dates.htm>
--
Rob




轻松可行,但你需要更具体地了解你拥有的东西和

你需要什么。计算很简单取决于你的来源

可能是什么,但计算很简单,只需要简洁和解释。


Danny


星期一,2005年7月4日15:50:11 -0700,Susan Cranford< ne ****** @ comcast.net>

写道:



-

使用Opera革命性的电子邮件客户端: http://www.opera.com/mail/


当然。我将使用

循环动态创建几个文本输入框来创建这些不同数量的dob'。当输入一个/ b
的dob时(txtDOB1,txtDOB2 ...)我想计算年龄(我是

绑定使用vbscript和datediff试试并使用onchange

事件调用该函数,然后将年龄放在每个txtDOBn输入框旁边的只读文本框中。




足够的信息吗?


***通过开发人员发送索引 http://www.developersdex.com ***
Sure. I will have several text input boxes created on the fly using
loops to create these varying number of dob''s. When a dob on one of
them is entered (txtDOB1, txtDOB2...) I want to calc the age (I was
tying to use vbscript and datediff to try and do this with an onchange
event to call the function) and then put the age in a readonly text box
right beside each of the txtDOBn input boxes.

Is that enough info ?

*** Sent via Developersdex http://www.developersdex.com ***