Internet explorer 关于IE问题的讨论

Internet explorer 关于IE问题的讨论,internet-explorer,onmouseover,Internet Explorer,Onmouseover,我正在为一个工作朋友免费制作一个网站,显然我的知识和经验有限,这就是为什么我在这里寻求帮助 我不确定我是否需要一个.js文件或.css文件来让onmouseover工作;我现在完全没有主意了 <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> <head> <!-- CHANGE THE NEXT THREE LINES -->

我正在为一个工作朋友免费制作一个网站,显然我的知识和经验有限,这就是为什么我在这里寻求帮助

我不确定我是否需要一个.js文件或.css文件来让onmouseover工作;我现在完全没有主意了

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>

    <head>
        <!-- CHANGE THE NEXT THREE LINES -->
        <title>Parkley Visual Arts</title>
        <meta name="Description" content="Parkley Visual Arts. Graphic Design & Art">
        <meta name="KeyWords" content="Graphic Design, Graphic Arts, Frame Pictures, Frame Pics, Photopgraphy, Leamington Arts, Leamington Graphics, Leamington Designs, Warwickshire Graphic Arts">
        <!-- CHANGE THE ABOVE THREE LINES -->
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <META name="Copyright" content="Copyright 2013 Parkley Visual Arts">
        <META http-equiv="Content-Language" content="en">
        <META name="revisit-after" content="15 days">
        <META name="robots" content="index, follow">
        <META name="Rating" content="General">
        <META name="Robots" content="All">
        <!-- InstanceBeginEditable name="head" -->
        <!-- InstanceEndEditable -->
        <link rel=StyleSheet href="corporatestyle.css" type="text/css" media="screen">
        <script language="JavaScript" src="javascripts.js"></script>
        <script language="JavaScript" src="pop-closeup.js"></script>
        <script type="text/javascript">
            window.onload = function() {
                "use strict";
                var Minilogo, Eyewinker, LearnMore;
                Minilogo = document.getElementById('Minilogo');
                Eyewinker = document.getElementById('Eyewinker');

                Minilogo.onmouseover = function() {
                    Minilogo.src = 'Minilogo.gif';
                };
                Eyewinker.onmouseover = function() {
                    TW.src = 'Eyewinker.gif';
                };

                Minilogo.onmouseout = function() {
                    Minilogo.src = 'Minilogo.gif';
                };
                Eyewinker.onmouseout = function() {
                    Eyewinker.src = 'Eyewinker.gif';
                };
            };

            if (browser == "Microsoft Internet Explorer") {
                countryListItem.attachEvent('onmouseover', sp.showPanel('item' + x), false);
            } else {
                countryListItem.addEventListener('mouseover', sp.showPanel('item' + x), false);
            }

            function swapImage(imgID, imgSrc) {
                var theImage = document.getElementById(imgID)
                theImage.src = imgSrc;
            }

            function preLoadImages() {
                for (var i = 0; i < arguments.length; i++) {
                    var tmpImage = new Image();
                    tmpImage.src = arguments[i];
                }
            }
        </script>
    </head>

    <body onload="preLoadImages('Eyewinker.gif');">
        <div style="text-align: center;">
            <center><a href="http://www.parkleyvisualarts.com/construction.htm"><img id="imgToSwap" src="Minilogo.gif" alt="animated gif" onmouseover="swapImage('imgToSwap', 'Eyewinker.gif')" onmouseout="swapImage('imgToSwap', 'Minilogo.gif')" /></a>

        </div>
    </BODY>

</HTML>

帕克利视觉艺术
window.onload=函数(){
“严格使用”;
var Minilogo、Eyewinker、LearnMore;
Minilogo=document.getElementById('Minilogo');
eyevinker=document.getElementById('eyevinker');
Minilogo.onmouseover=函数(){
Minilogo.src='Minilogo.gif';
};
eyevinker.onmouseover=函数(){
TW.src='eyevinker.gif';
};
Minilogo.onmouseout=函数(){
Minilogo.src='Minilogo.gif';
};
eyevinker.onmouseout=函数(){
eyevinker.src='eyevinker.gif';
};
};
如果(浏览器==“Microsoft Internet Explorer”){
countryListItem.attachEvent('onmouseover',sp.showPanel('item'+x),false);
}否则{
countryListItem.addEventListener('mouseover',sp.showPanel('item'+x),false);
}
功能交换页面(imgID、imgSrc){
var theImage=document.getElementById(imgID)
theImage.src=imgSrc;
}
函数preload images(){
for(var i=0;i
如果您是新手,您可能应该尽量避免使用冗长的JavaScript,因为这将很难管理。相反,我鼓励您从图像属性开始,比如
onmouseover
onmouseout
。考虑以下事项:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>Hover-Fading Buttons</title>
        <base href="http://parkleyvisualarts.com/" />
        <style>
            img.logo {
                width: 300px;
                height: 300px;
                display: block;
                margin: 0 auto;
            }
        </style>
    </head>
    <body>
        <img src="Minilogo.gif" class="logo"
             onmouseover=" this.src = 'Eyewinker.gif' " 
             onmouseout=" this.src = 'Minilogo.gif' " />
    </body>
</html>

悬停淡入淡出按钮
img.logo{
宽度:300px;
高度:300px;
显示:块;
保证金:0自动;
}

我确信用反勾号将每行代码包装起来花费了很多时间,但请撤消该操作,并在每行前面使用四个空格。您还可以将代码粘贴到问题上,突出显示它,然后按编辑器中的
{}
按钮。lol确实如此,我是否正确更改了它?谢谢你的提醒:)真是太感谢你了!先生,你是一个非常善良的传奇人物!完全为我修好了!我添加了“border:0”;因此IE中的图像周围没有方框,但非常感谢!让我开心:)