开发者

jQuery not working in IE6 at all

I'm at a complete loss here. A client of mine uses IE6 internally and for 开发者_高级运维some reason even the simplest jQuery does not work. Here is the code that will not work.

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title></title>
    <script type="text/javascript" src="js/jquery-1.4.2.js" />
    <script type="text/javascript">

        jQuery(function() {
            alert("alert from jQuery");
        });

        $(document).ready(function() {
            alert("alert from doc.ready");
        });


    </script>

</head>
<body>

</body>
</html>

I know that there are a lot of issues with IE6. Ive tried a bunch of the workarounds that I found on the internet (like putting the script at the bottom of the page, removing the type attr) and no dice. any help would be greatly appreciated.


This will not work in a lot of browsers actually because you've not included the script properly. You must do the following:

<script type="text/javascript" src="js/jquery-1.4.2.js"></script>

The script tags must be done as above or the script will not be included.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜