在IE9中有序列表显示全零 [英] Ordered list showing all zeros in IE9

查看:99
本文介绍了在IE9中有序列表显示全零的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个< ol> (有序列表),在FF,Safari和Chrome中,它的显示正确。但在IE9中显示全部为零。这不是间距/填充问题,因为我能看到零。

我的HTML如下:

 < ol> 
< li>输入基本公司信息< / li>
< li>从我们的产品组合中选择< / li>
< li>附上员工人口普查< / li>
< li>查看您的选择并提交您的请求。< / li>
< / ol>

任何人都会遇到这个问题,希望有解决方案吗?



解决方案

更新3/20/2012 - 在IE10中修复



Explorer 10(所有文档模式)。 Microsoft已删除 Connect 条目,因此您无法查看其状态。由于微软现在自动推低IE10,它应该适用于所有常规客户。




这是一个已知的IE9回归,这已在Microsoft Connect上报告过:



< :错误

ID :657695

已打开:4/6/2011下午12:10:52

访问权限限制:公开


0 解决方法(s )

5 用户可以重现此错误






更新:
$ b


发布者 Microsoft 2011年6月14日下午3:20

感谢您的反馈。



我们能够重现此问题并正在调查它。



最好的问候,



Internet Explorer团队






复制错误的HTML页面:

 <!DOCTYPE html> 
< HTML>
< HEAD>
< TITLE> IE9 Ordered List Zero Bug< / TITLE>
< SCRIPT type =text / javascript>
setTimeout(function()
{
document.getElementById(dv1)。innerHTML =< ol>< li> XXX< / li>< li> YYY< li>< / ol>;
var container = document.createElement('span');
container.style.cssText =display:none;
document.getElementById( dv2)。appendChild(container);
},1000);
< / SCRIPT>
< / HEAD>
< BODY>

< DIV id =dv1>
< OL>
< LI> AAA< / LI>
< LI> BBB< / LI>
< / OL>
< / DIV>

< DIV id =dv2>< / DIV>

< / BODY>
< / HTML>

解决方法是在您的 DIV 之后放置一个空元素:

 < div id =one> 
< ol>
< li> one< / li>
< li> two< / li>
< / ol>
< / div>
< div id =twostyle =display:none>
< ol>
< li>三< / li>
< li> four< / li>
< / ol>
< / div>
< div id =empty>< / div>



显示错误的浏览器



<
$ b


  • 文档模式怪癖:作品

  • Internet Explorer 9(9.0.8112.16421) li>文档模式IE7标准:Works
  • 文档模式IE8标准:失败

  • >失败



Internet Explorer 8(8.0.6001.19048)




  • 文档模式怪癖:工作

  • 文档模式IE7标准:Works

  • 模式IE8标准:Works



Internet Explorer 7(7.0.6000.16982):作品



Google Chrome 10(10.0.648.134):有效


I have an <ol> (ordered list) and in FF, Safari, Chrome it is rendered correctly. However in IE9 it is showing all zeros. It is not a spacing/padding issue because I am able to see the zeros.

My HTML is as follows:

<ol> 
    <li>Enter basic company information</li> 
    <li>Select from our portfolio of products</li> 
    <li>Attach your employee census</li> 
    <li>Review your selections and submit your request.</li> 
</ol>

Anyone run into that problem and hopefully a solution?

解决方案

Update 3/20/2012 - Fixed in IE10

This regression has been fixed in Internet Explorer 10 (all document modes). Microsoft has deleted the Connect entry, so you cannot review its status. Since Microsoft now pushes IE10 down automatically, it should be working for all your regular customers.


This is a known IE9 regression, which has been reported on Microsoft Connect:

Ordered list numbering changes from correct to 0, 0

Type: Bug
ID: 657695
Opened: 4/6/2011 12:10:52 PM
Access Restriction: Public

0 Workaround(s)
5 User(s) can reproduce this bug


Update:

Posted by Microsoft on 6/14/2011 at 3:20 PM
Thank you for your feedback.

We were able to reproduce the issue and are investigating it.

Best regards,

The Internet Explorer Team


HTML page that reproduces bug:

<!DOCTYPE html>
<HTML>
<HEAD>
<TITLE>IE9 Ordered List Zero Bug</TITLE>
<SCRIPT type="text/javascript">
    setTimeout(function ()
        {
            document.getElementById("dv1").innerHTML = "<ol><li>XXX</li><li>YYY</li></ol>";
            var container = document.createElement('span');
            container.style.cssText = "display:none";
            document.getElementById("dv2").appendChild(container);
        }, 1000);
</SCRIPT>
</HEAD>
<BODY>

<DIV id="dv1">
    <OL>
    <LI>AAA</LI>
    <LI>BBB</LI>
    </OL>
</DIV>

<DIV id="dv2"></DIV>

</BODY>
</HTML>

A workaround is to place an empty element after your DIV:

<div id="one">
   <ol>
      <li>one</li>
      <li>two</li>
   </ol>
</div>
<div id="two" style="display:none">
   <ol>
      <li>three</li>
      <li>four</li>
   </ol>
</div>
<div id="empty"></div>

Browsers that exhibit the bug

Internet Explorer 9 (9.0.8112.16421)

  • Document Mode Quirks: Works
  • Document Mode IE7 standards: Works
  • Document Mode IE8 standards: Fails
  • Document Mode IE9 standards: Fails

Internet Explorer 8 (8.0.6001.19048)

  • Document Mode Quirks: Works
  • Document Mode IE7 standards: Works
  • Document Mode IE8 standards: Works

Internet Explorer 7 (7.0.6000.16982): Works

Google Chrome 10 (10.0.648.134): Works

这篇关于在IE9中有序列表显示全零的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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