2个问题(日期和写作) [英] 2 Questions (Date and Write)

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

问题描述

1。 getYear()函数在IE中返回2004,在Netscape中返回104。

这是正常的吗?没问题。如果它小于1000,我只需要添加1900.

也许有更新的功能。让我知道。


2.有没有办法在页面显示后使用document.write

而不重绘整个页面?我不想使用框架或

iframe。我想要做的是显示一个日历,如果日期是

改变了,那么重新绘制它。


你到目前为止我可以看到我的日历在我家页面。


-

Dennis M. Marks
http://www.dcs-chico.com/~denmarks/

用dcsi.net替换domain.invalid

----- =通过Newsfeeds.Com发布,未经审查的Usenet新闻= -----
http://www.newsfeeds.com - 世界排名第一的新闻组服务!

----- ==超过100,000个新闻组 - 19种不同的服务器= -----

1. The getYear() function returns 2004 in IE and 104 in Netscape. Is
that normal? It''s no problem. I just add 1900 if it is less than 1000.
Maybe there is an updated function. Let me know.

2. Is there a way to use document.write after the page is displayed
without redrawing the entire page? I don''t want to use a frame or
iframe. What I am trying to do is display a calendar and if the date is
changed then redraw it.

You can see my calendar so far at my home page.

--
Dennis M. Marks
http://www.dcs-chico.com/~denmarks/
Replace domain.invalid with dcsi.net
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----

推荐答案

" Dennis M. Marks" <德****** @ domain.invalid>写道:
"Dennis M. Marks" <de******@domain.invalid> writes:
1. getYear()函数在IE中返回2004,在Netscape中返回104。


哪个Netscape? (测试.... Netscape 4和Mozilla ......和Opera。

这是正常的吗?


这是正常的吗?浏览器有什么不同?那个IE做错了吗?不要

两个人:

这没问题。如果它小于
1000,我只需要添加1900.也许有更新的功能。让我知道。


更新后的函数是getFullYear。它并不适用于所有旧的
浏览器(虽然它似乎确实存在于Netscape 4和IE 4中)。

2.有没有办法使用文档。显示页面后写入
而无需重新绘制整个页面?
1. The getYear() function returns 2004 in IE and 104 in Netscape.
Which Netscape? (testing.... both Netscape 4 and Mozilla ... and Opera.
Is that normal?
Is what normal? That browsers differ? That IE is doing it wrong? No to
both :)
It''s no problem. I just add 1900 if it is less than
1000. Maybe there is an updated function. Let me know.
The updated function is getFullYear. It is not available in all old
browsers (although it does seem to exist in both Netscape 4 and IE 4).
2. Is there a way to use document.write after the page is displayed
without redrawing the entire page?




编号如果您需要在加载后向页面添加内容,则必须

使用W3C DOM方法或Microsoft DOMinnerHTML方法。物品。

或者将内容放在输入元素中。


/ L

-

Lasse Reichstein Nielsen - lr*@hotpop.com

DHTML死亡颜色:< URL:http:// www.infimum.dk/HTML/rasterTriangleDOM.html>

''没有判断的信仰只会降低精神神圣。''



No. If you need to add content to a page after it has loaded, you must
use either W3C DOM methods or the Microsoft DOM "innerHTML" property.
Or put the content inside an input element.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
''Faith without judgement merely degrades the spirit divine.''


Dennis M Marks写道:
Dennis M. Marks wrote:
1. getYear()函数在IE中返回2004,在Netscape中返回104。这是正常的吗?没问题。如果它小于1000,我只需要添加1900.
也许有更新的功能。让我知道。

2.有没有办法在页面显示后使用document.write
而不重绘整个页面?我不想使用框架或
iframe。我想要做的是显示一个日历,如果更改日期,则重新绘制它。
1. The getYear() function returns 2004 in IE and 104 in Netscape. Is
that normal? It''s no problem. I just add 1900 if it is less than 1000.
Maybe there is an updated function. Let me know.

2. Is there a way to use document.write after the page is displayed
without redrawing the entire page? I don''t want to use a frame or
iframe. What I am trying to do is display a calendar and if the date is
changed then redraw it.




至于问题2.这可以使用DOM:文档对象模型。

从本质上讲,你在页面中创建了一种占位符,可以在事后写入

。有一个很好的例子说明如何在最新版本的Flanagan的Rhino中做到这一点

。书

(javascript :权威指南)。这本书是必备的,您可以通过注册免费试用2周来立即获得这本书

在线订阅5本(或更多)书籍,在safari.oreilly.com



As for issue 2. This can be done using the DOM: Document Object Model.
In essence you create a sort of placeholder in the page that can be
written to after the fact. There is a good example of how to do this
sort of thing in the most current edition of Flanagan''s "Rhino" book
(javascript: The Definitive Guide). This book is a must-have, and you
can get it immediately by signing up for a free 2-week trial
subscription to 5 (or more) books online, at safari.oreilly.com


我已阅读以下来自Dennis M. Marks的消息

< de **** **@domain.invalid>

并决定借给我丰富的知识。


作者说:
I have read the following message from "Dennis M. Marks"
<de******@domain.invalid>
and have decided to lend my vast knowledge.

The writer said:
1。 getYear()函数在IE中返回2004,在Netscape中返回104。这是正常的吗?没问题。如果它小于1000,我只需要添加1900.
也许有更新的功能。让我知道。

2.有没有办法在页面显示后使用document.write
而不重绘整个页面?我不想使用框架或
iframe。我想要做的是显示一个日历,如果更改了日期,那么重新绘制它。

到目前为止,我可以在我的主页上看到我的日历。
1. The getYear() function returns 2004 in IE and 104 in Netscape. Is
that normal? It''s no problem. I just add 1900 if it is less than 1000.
Maybe there is an updated function. Let me know.

2. Is there a way to use document.write after the page is displayed
without redrawing the entire page? I don''t want to use a frame or
iframe. What I am trying to do is display a calendar and if the date is
changed then redraw it.

You can see my calendar so far at my home page.




我的回复是:

我找到问题1的答案(getFullYear)。我仍然需要回答

来回答问题2.


-

Dennis M. Marks
http://www.dcs-chico.com/~denmarks/

用dcsi.net替换domain.invalid

----- =通过Newsfeeds.Com发布,未经审查的Usenet新闻= -----
http://www.newsfeeds.com - 世界排名第一的新闻组服务!

----- ==超过100,000个新闻组 - 19个不同的服务器! = -----



and my reply is:
I found the answer to question 1 (getFullYear). I still need an answer
to question 2.

--
Dennis M. Marks
http://www.dcs-chico.com/~denmarks/
Replace domain.invalid with dcsi.net
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----


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

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