基于 DOM 的脚本
好吧,这就是我的问题...... 我一直在关注本教程( http://www.alistapart.com/articles/dropdowns) 用我的 WordPress 博客制作一个 CSS 下拉菜单。一切工作正常...除了 IE6。 现在我知道这是正常的,在我上面发布的链接中有一个修复程序,它使用基于 DOM 的脚本...这是 java 脚本吗?
我的主要问题是..我应该将此代码粘贴到哪里? css、html,新建一个文件吗? 我对任何形式的 javascript 都是新手..这让我有点困惑..
任何帮助都会很棒!
谢谢!
敬上 菜鸟
ok so here's my problem...
i've been following this tutorial ( http://www.alistapart.com/articles/dropdowns )
to make a css drop down menu with my wordpress blog. everything works fine... except in IE6.
now i know this is normal, and in the link i posted above there is a fix of this which makes use of DOM based scripting... is this java script?
the main question i have is.. where do i paste this code into? css, html, make a new file?
i'm new to any form of javascript.. it's boggling me a bit..
any help would be great!
Thanks!
yours truly
noobie
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,它就是 JavaScript。
因此,您可以将其放置在
块中,最好放在
内。 (它将自身分配给
window.onload
,因此无论您将代码放在页面的哪个位置,代码都会在onload时执行)Yes, it is JavaScript.
As such, you can place it in a
<script>
block, preferrably inside<head>
. (It assigns itself towindow.onload
, so the code will be executed at onload, no matter where in the page you put the code)我的主要问题是..我应该将此代码粘贴到哪里? css、html,新建一个文件?
我建议你看一下这个示例页面的源码:
http://www.htmldog.com/articles/suckerfish/bones/。它显示了其实现方式的基本细节。
我对任何形式的 javascript 都是新手。这让我有点困惑。
我建议您阅读这个很好的教程,它已经在年:w3schools.com/js。
格兹,克里斯。
the main question i have is.. where do i paste this code into? css, html, make a new file?
I suggest you take a look at the source of this sample page:
http://www.htmldog.com/articles/suckerfish/bones/. It shows the bare details of how it's implemented.
i'm new to any form of javascript.. it's boggling me a bit..
I would like to suggest you read this nice tutorial which already helped out numerous developers during the years: w3schools.com/js.
Grz, Kris.