IE5 / 6,但不是IE4,做得出乎意料 [英] IE5/6, but not IE4, doing unexpected

查看:76
本文介绍了IE5 / 6,但不是IE4,做得出乎意料的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



In< URL:http://www.merlyn.demon.co.uk/estrdate.htm#T3>按钮Table

III Reversed执行


函数BCPTableIII(){var GN,DM,Ro,CY

document.write(" \t\t\tCalculated Table III,

"< fieldset> \ t \\\\\\\\\\\\\\\\\\\\\\\\\\\\ for(GN = 19; GN; GN--)document.write(Prfx(GN,3,""))

document.write("< hr> \ n" )

for(Ro = DM = 21; Ro <= 51; Ro ++,DM ++){

for(GN = 19; GN; GN--){br如果(Ro == 49&& GN == 11){Ro ++

document.write(" \t\t\t\t",RightCols(DM-1)," \ n \\\\\\\\\}}} >
document.write(Prfx(CY,3,""))}

if(DM == 50)DM -

文件。写(RightCols(DM),Ro%5 == 0?"< hr> \ n":" \ n")}

document.write("< \\ \\ / fieldset>")}


其中的输出RightCols没有密切关系,我们有函数Prfx(Q,L,c){var s = Q +"" // ??

// if(!c)var c =''''

if(c.length> 0)while(s.length< L) {s = c + s};

返回s}


和输出(切断的顶部,底部和右侧)在IE4中如预期的那样


28 17 6 25 14

29 18 7 26 15

0 19 8 27 16

- --------------

1 20 9 28 17

2 21 10 29 18

3 22 11 0 19

但是在以后的IE中,行的第一个或第二个空格在

行中省略,其中第一列数字是单位数。正如你所看到的,其他一位数的条目没有

的问题。


28 17 6 25 14

29 18 7 26 15

0 19 8 27 16

---------------

1 20 9 28 17

2 21 10 29 18

3 22 11 0 19

我不能轻易实验,因为IE> 4机器距离一英里远。


解释是什么,建议的解决方案是什么?


-

?约翰斯托克顿,英国萨里。 ?@merlyn.demon.co.uk Turnpike v4.00 IE 4?

< URL:http://www.jibbering.com/faq/> JL / RC:新闻常见问题:comp.lang.javascript

< URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr数学,日期,来源。

< URL:http://www.merlyn.demon.co.uk/> TP / BP / Delphi / jscr /& c,FAQ项目,链接。


In <URL:http://www.merlyn.demon.co.uk/estrdate.htm#T3> the button "Table
III Reversed" executes

function BCPTableIII() { var GN, DM, Ro, CY
document.write("\t\t\tCalculated Table III",
"<fieldset>\t\t\t THE GOLDEN NUMBERS\t\t SL P F M\n")
for (GN=19 ; GN ; GN--) document.write(Prfx(GN, 3, " "))
document.write("<hr>\n")
for (Ro=DM=21 ; Ro<=51 ; Ro++, DM++) {
for (GN=19 ; GN ; GN--) {
CY = (11*GN + DM + 6) % 30
if (Ro==49 && GN==11) { Ro++
document.write("\t\t\t\t ", RightCols(DM-1), "\n\t\t\t")}
document.write(Prfx(CY, 3, " ")) }
if (DM==50) DM--
document.write(RightCols(DM), Ro%5==0 ? "<hr>\n" : "\n" ) }
document.write("<\/fieldset>") }

in which the output of RightCols is not germane, and we have

function Prfx(Q, L, c) { var s = Q+"" // ??
// if (!c) var c = '' ''
if (c.length>0) while (s.length<L) { s = c+s } ;
return s }

and the output (chopped top, bottom, and right) is in IE4 as expected

28 17 6 25 14
29 18 7 26 15
0 19 8 27 16
---------------
1 20 9 28 17
2 21 10 29 18
3 22 11 0 19
However in a later IE, the first or second space of a row is omitted in
rows where the first column of numbers is single-digit. There''s no
problem with other single-digit entries, as you can see.

28 17 6 25 14
29 18 7 26 15
0 19 8 27 16
---------------
1 20 9 28 17
2 21 10 29 18
3 22 11 0 19
I cannot easily experiment, as the IE>4 machine is a mile away.

What''s the explanation, and the suggested fix?

--
? John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ?
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.

推荐答案



John Stockton博士写道:

Dr John Stockton wrote:
在< URL:http://www.merlyn.demon.co.uk/estrdate.htm#T3>按钮Table
III Reversed执行功能BCPTableIII(){var GN,DM,Ro,CY
document.write(" \t\t\tCalculated Table III,
;< fieldset> \ t \\\\\\\\\\\\\\\\\\\\\\\\\\\\ Prfx(GN,3,""))
document.write("< hr> \ n")
for(Ro = DM = 21; Ro< = 51; Ro ++, DM ++){
for(GN = 19; GN; GN--){
CY =(11 * GN + DM + 6)%30
if(Ro == 49&& ; GN == 11){Ro ++
document.write(" \t\t\t\t",RightCols(DM-1)," \ n \\\ t \t")}
document.write(Prfx(CY,3,""))}
if(DM == 50)DM--
document.write( RightCols(DM),Ro%5 == 0?"< hr> \ n":" \ n")}
document.write("< \ / fieldset>" )}

其中RightCols的输出不是germa ne,我们有函数Prfx(Q,L,c){var s = Q +"" // ??
// if(!c)var c =''''
if(c.length> 0)while(s.length< L){s = c + s};
返回s}

输出(切碎的顶部,底部和右侧)按预期在IE4中

28 17 6 25 14
29 18 7 26 15
0 19 8 27 16
---------------
1 20 9 28 17
2 21 10 29 18
3 22 11 0 19

但是在以后的IE中,行的第一个或第二个空格在第一列数字为单位的行中被省略。正如你所看到的,其他一位数的条目没有问题。

28 17 6 25 14
29 18 7 26 15
0 19 8 27 16
---------------
1 20 9 28 17
2 21 10 29 18
3 22 11 0 19

我不能轻易实验,因为IE> 4机器距离一英里远。

解释是什么,建议修复?
In <URL:http://www.merlyn.demon.co.uk/estrdate.htm#T3> the button "Table
III Reversed" executes

function BCPTableIII() { var GN, DM, Ro, CY
document.write("\t\t\tCalculated Table III",
"<fieldset>\t\t\t THE GOLDEN NUMBERS\t\t SL P F M\n")
for (GN=19 ; GN ; GN--) document.write(Prfx(GN, 3, " "))
document.write("<hr>\n")
for (Ro=DM=21 ; Ro<=51 ; Ro++, DM++) {
for (GN=19 ; GN ; GN--) {
CY = (11*GN + DM + 6) % 30
if (Ro==49 && GN==11) { Ro++
document.write("\t\t\t\t ", RightCols(DM-1), "\n\t\t\t")}
document.write(Prfx(CY, 3, " ")) }
if (DM==50) DM--
document.write(RightCols(DM), Ro%5==0 ? "<hr>\n" : "\n" ) }
document.write("<\/fieldset>") }

in which the output of RightCols is not germane, and we have

function Prfx(Q, L, c) { var s = Q+"" // ??
// if (!c) var c = '' ''
if (c.length>0) while (s.length<L) { s = c+s } ;
return s }

and the output (chopped top, bottom, and right) is in IE4 as expected

28 17 6 25 14
29 18 7 26 15
0 19 8 27 16
---------------
1 20 9 28 17
2 21 10 29 18
3 22 11 0 19
However in a later IE, the first or second space of a row is omitted in
rows where the first column of numbers is single-digit. There''s no
problem with other single-digit entries, as you can see.

28 17 6 25 14
29 18 7 26 15
0 19 8 27 16
---------------
1 20 9 28 17
2 21 10 29 18
3 22 11 0 19
I cannot easily experiment, as the IE>4 machine is a mile away.

What''s the explanation, and the suggested fix?



因为我安装了几个浏览器,所以检查了你提到的页面

和几个按钮。我的SBC / Yahoo DSL浏览器(只是经过修改的IE6)

显示了你提到的放置问题。最新的Opera正确显示

表。然而,当您点击按钮时,最新的Mozilla系列浏览器(Mozilla,

Firefox和Netscape)仅提供一些顶级标题。进度条以大约1/2的方式停止,而不是
移动并输出大部分表格,至少在3分钟内我等待b $ b。 Netscape 4.8完全拒绝下载你的页面并发出

警报,并显示消息File include1.js end fault,RSVP!。当你确定

警报时,浏览器会关闭。这可能不太重要

,因为Netscape 4.8在大多数国家都已经死了。


你的页面相当复杂,你使用的风格相当

与我使用的不同,所以我现在没有时间尝试

确切地确定发生了什么。我现在用CSS做几乎所有的定位

,经常使用脚本计算CSS定位,因为我在我的万年历的全年日历显示输出中做了
。在

的情况下,需要在javascript中使用document.write,我现在必须在服务器上的php中执行代码部分,因为document.write可以

不能在真正的html 1.1页面中处理,作为

application / xhtml + xml,它被解析为XML。一个php包含在顶部

的php页面将代码转换为html 4.01严格为过时的

浏览器,如IE6,不接受上述mime < br $>
类型。


当然,你只提到IE浏览器,所以你的页面在

其他浏览器可能会或可能不会你感兴趣。



Since I have several browsers installed I checked your mentioned page
and button on several. My SBC/Yahoo DSL browser(just a modified IE6)
shows the placement problems you mention. The latest Opera displays the
table correctly. However the latest Mozilla family browsers(Mozilla,
Firefox, and Netscape) only give some of the top headings when you
click the button. The progress bar halts at about 1/2 way, and does not
move and output the bulk of the table, at least for the 3 minutes I
waited. Netscape 4.8 refuses to download your page at all and gives an
alert with the message "File include1.js end fault, RSVP!". When you OK
the alert, the browser goes down. This likely is of little importance
since the Netscape 4.8 is all but dead in most countries.

Your page is fairly complicated and you use a style considerably
different from what I use, so I do notnow have time to attempt to
determine exactly what is going on. I now do nearly all positioning
with CSS , often using script to calculate the CSS positioning as I did
in the full year calendar display output for my perpetual calendar. In
cases that would require a document.write in javascript, I now have to
do that portion of the code in php on the server, as document.write can
not be processed in a true html 1.1 page served as
application/xhtml+xml, which is parsed as XML. A php include at the top
of the php page converts the code to html 4.01 strict for outmoded
browsers, such as the IE6, that will not accept the mentioned mime
type.

Of course, you only mentioned IE browsers, so what your page does on
other browsers may or may not be of interest to you.



cw *****@yahoo.com 写道:
然而,最新的Mozilla家族浏览器(Mozilla,
Firefox和Netscape)只提供了一些顶级标题你点击按钮。进度条以大约1/2的方式停止,并且不会移动并输出大部分表,至少在我等待的3分钟内。
However the latest Mozilla family browsers(Mozilla,
Firefox, and Netscape) only give some of the top headings when you
click the button. The progress bar halts at about 1/2 way, and does not
move and output the bulk of the table, at least for the 3 minutes I
waited.




我有一个屏幕截图
http://www.cwdjr.info/temp/table3.jpg ,它显示了Firefox浏览器上表3的输出

的确切位置。也许这会帮助你

缩小可能导致问题的代码部分。



I have a screen capture for you at
http://www.cwdjr.info/temp/table3.jpg that shows exactly where output
of table 3 stops on the Firefox browser. Perhaps this will help you
narrow the portion of the code that may be causing the problem.



< a href =mailto:cw ****** @ yahoo.com> cw ****** @ yahoo.com 写道:
最新的Opera显示表格正确。
The latest Opera displays the table correctly.




使用最新的Opera浏览器进行屏幕截图
http://www.cwdjr.info/temp/table3Opera.jpg 。表格的一部分是底部屏幕外的
。我看到我甚至设法捕获了

光标:-)。这个观点对我来说很正常,但你知道你想要什么。



There is a screen capture using the latest Opera browser at
http://www.cwdjr.info/temp/table3Opera.jpg . Part of the table is
off-screen at the bottom. I see that I even managed to capture the
cursor :-). This view looks normal to me, but you know what you wanted.


这篇关于IE5 / 6,但不是IE4,做得出乎意料的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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