如果使用 YUI 2.8,是否可以避免 IE 的区分大小写的 ID?

发布于 2024-09-02 04:38:03 字数 252 浏览 1 评论 0原文

我在 IE 中使用 YAHOO.util.Dom.get 。

它似乎区分大小写,YUI(2.8)似乎无法处理。 FF 可让您获取 ID,而不会出现区分大小写的问题。我想知道是否有办法在 IE 中也能做到这一点。

链接表示存在问题。但 YUI 能够解决这个问题吗?

I'm using YAHOO.util.Dom.get in IE.

It seems to be case sensitive and YUI (2.8) can't seem to deal with. FF lets you get ID's without case sensitivity issues. I was wondering if there is a way to also do it in IE.

This link says there is a problem. But has YUI been able to get around this ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

べ繥欢鉨o。 2024-09-09 04:38:03

我为此做了一个快速测试。

http://tivac.com/yui2/giulio_id.htm

document.getElementById 是 IE 中不区分大小写 < 8. 应该是的,其他浏览器中都有。

YAHOO.util.Dom.get 在所有浏览器中IS 区分大小写。

I made a quick test for this.

http://tivac.com/yui2/giulio_id.htm

document.getElementById is NOT case-sensitive in IE < 8. It should be, it is in every other browser.

YAHOO.util.Dom.get IS case-sensitive in all browsers.

美胚控场 2024-09-09 04:38:03

你用的是IE8吗?因为它区分大小写。我发现 YUI 开发人员不太可能围绕这样的事情进行编码。

无论如何,我不希望我的 ID 因区分大小写而有所不同,因为这样我很可能会复制并粘贴错误的 ID。只要花时间让你的 id 变得漂亮和干净,不用担心 YUI 是否有解决办法。

Are you using IE8? Because it is case sensitive. I find it unlikely that the YUI developers would code around something like this.

I would prefer to not have my ids differ by case sensitivity anyway, since I am likely to copy and paste the wrong one that way. Just take the time to make your ids nice and clean and don't worry about if YUI does or doesn't have a work around.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文