文本和日期操作 [英] Text and Date Manipulation

查看:48
本文介绍了文本和日期操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨。


我知道这应该是一个简单的问题。

我知道服务器端的网络编程,而且从不需要使用客户端-b>

脚本...直到现在:)


到目前为止,我已经完成了一些运行良好的脚本。但是那里

是两个我遇到特殊困难:


1)

我有一个SELECT类型输入," ; document.form_name.select_input"。

我有一个TEXTAREA类型输入,document.form_name.text_area。

我有一个按钮按钮。

当按钮时按下,text_area的值应为

" text_area" +" select_input" s value。


2)

我有一个TEXT类型输入" document.form_name.date1"。

我有一个TEXT类型输入" document.form_name.date2"。

我有一个TEXT类型输入document.form_name.days。

当前两个中的任何一个发生变化时(格式为

" dd / mm /的日期) yyyy),第三个应该包含

日期之间的差异,以天为单位。


这些有任何帮助吗?

谢谢;

SGershon

Hi.

I know this is should be a simple question.
I know server-side web-programming, and never needed to use client-side
scripting... until now :)

I have done so far a little number of scripts that work well. But there
are two that I am having special difficulties with:

1)
I have a SELECT type input, "document.form_name.select_input".
I have a TEXTAREA type input, "document.form_name.text_area".
I have a BUTTON "button".
When "button" is pressed, "text_area"s value should be
"text_area"+"select_input"s value.

2)
I have a TEXT type input "document.form_name.date1".
I have a TEXT type input "document.form_name.date2".
I have a TEXT type input "document.form_name.days".
When any of the first two changes (to a date in the format
"dd/mm/yyyy"), the third one should contain the difference between the
dates, in days.

Any help with these?

Thanks;
SGershon

推荐答案

< sg ****** @ gmail.com>在消息中写道

news:11 ********************** @ l41g2000cwc.googlegr oups.com ...
<sg******@gmail.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...
嗨。

我知道这应该是一个简单的问题。
我知道服务器端的网页编程,而且从不需要使用客户端的脚本......直到现在:)

到目前为止,我已经完成了一些运行良好的脚本。但是有两个我有特殊困难:

1)我有一个SELECT类型输入,document.form_name.select_input。
我有一个TEXTAREA类型输入,document.form_name.text_area。
我有一个按钮按钮。
当按钮按钮时。按下,text_area的值应为
text_area+select_input的值。

2)
我有一个TEXT类型输入文档.form_name.date1"。
我有一个TEXT类型输入" document.form_name.date2"。
我有一个TEXT类型输入" document.form_name.days"。
什么时候在前两个更改(格式为
dd / mm / yyyy的日期)中,第三个应包含
日期之间的差异,以天为单位。

对这些有任何帮助吗?

谢谢;
SGershon
Hi.

I know this is should be a simple question.
I know server-side web-programming, and never needed to use client-side
scripting... until now :)

I have done so far a little number of scripts that work well. But there
are two that I am having special difficulties with:

1)
I have a SELECT type input, "document.form_name.select_input".
I have a TEXTAREA type input, "document.form_name.text_area".
I have a BUTTON "button".
When "button" is pressed, "text_area"s value should be
"text_area"+"select_input"s value.

2)
I have a TEXT type input "document.form_name.date1".
I have a TEXT type input "document.form_name.date2".
I have a TEXT type input "document.form_name.days".
When any of the first two changes (to a date in the format
"dd/mm/yyyy"), the third one should contain the difference between the
dates, in days.

Any help with these?

Thanks;
SGershon




听起来像学校作业。



It sounds like a school assignment.


:)

不,这不是学校的功课。我可以看到这个问题写的是

作为一个,也许因为我曾经在一个更友善的花园里教... ...


我26岁岁,所以如果是学校作业,我的老师会对我真的生气!大声笑!


我已经在HTML / PHP上做了简单的页面,并且没有

JavaScript(我知道它的强大功能和很多功能)。现在我需要做的一个

的脚本必须在提交之前动态地改变很多东西

。我已经完成的许多功能和他们的工作都很有效,但是这两个功能一直给我错误或错误的结果。


感谢您的教育关注,无论如何!

感谢您提供给我的任何帮助。

:)
No, it is not a school homework. I can see that the question is written
as one, maybe cause I used to teach in a kinder-garden... :)

I am 26 years old, so if it was a school assignment, my teacher would
be real mad at me! lol!

I have done simple pages on HTML/PHP, and went very well without
JavaScript (I know its powerfull and has lots of capabilities). Now one
of the scripts I need to do has to change many things dynamically
before submitting it. Many of the functions I''ve already done and they
are working, but these two keep giving me errors or wrong results.

Thanks for the education concern, anyway!
And thanks for any help you can give me.


文章< 11 **** ******************@l41g2000cwc.googlegroups .com> ;,
sg******@gmail.com 启发我们...
In article <11**********************@l41g2000cwc.googlegroups .com>,
sg******@gmail.com enlightened us with...

我到目前为止已经完成了一些运行良好的脚本。但是有两个我有特殊困难:


两者都不是很难。

你确定这不是功课?

1)
我有一个SELECT类型输入,document.form_name.select_input。
我有一个TEXTAREA类型输入,document.form_name.text_area" 。
我有一个按钮按钮。
当按钮按下时。按下,text_area的值应该是
" text_area" +" select_input" s value。


提示:

- - onclick

- document.form_name.select_input.options

[document.form_name.select_input.selectedIndex] .value

- 文件。 form_name.text_area.value

- NaN / isNaN

2)
我有一个TEXT类型输入" document.form_name.date1"。
我有一个TEXT类型输入" document.form_name.date2"。
我有一个TEXT类型输入" document.form_name.days"。
当前两个更改中的任何一个(到一个日期)格式为
dd / mm / yyyy),第三个应包含
日期之间的差异,以天为单位。

I have done so far a little number of scripts that work well. But there
are two that I am having special difficulties with:
Neither are very hard.
Are you sure this isn''t homework?

1)
I have a SELECT type input, "document.form_name.select_input".
I have a TEXTAREA type input, "document.form_name.text_area".
I have a BUTTON "button".
When "button" is pressed, "text_area"s value should be
"text_area"+"select_input"s value.

Hints:
-- onclick
-- document.form_name.select_input.options
[document.form_name.select_input.selectedIndex].value
-- document.form_name.text_area.value
-- NaN / isNaN
2)
I have a TEXT type input "document.form_name.date1".
I have a TEXT type input "document.form_name.date2".
I have a TEXT type input "document.form_name.days".
When any of the first two changes (to a date in the format
"dd/mm/yyyy"), the third one should contain the difference between the
dates, in days.




提示:

- onChange

- http://www.w3schools.com/js/js_obj_date.asp


HTH


-
-

~kaeli~

如果你不付你的驱魔人,你会被收回。
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace



Hints:
-- onChange
-- http://www.w3schools.com/js/js_obj_date.asp

HTH

--
--
~kaeli~
If you don''t pay your exorcist, you get repossessed.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace


这篇关于文本和日期操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆