简体   繁体   English

Javascript在IE7和IE8中不起作用

[英]Javascript does not work in IE7 and IE8

I have tried everything, changed and stripped my code. 我已经尝试了一切,更改并剥离了我的代码。 A simple alert message just won't work in IE 7 and IE 8. 一个简单的警报消息仅在IE 7和IE 8中不起作用。

Here is my code 这是我的代码

<html>
    <head>

        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <title>Untitled Document</title>

        <script type="text/javascript">

            alert("hi");

        </script>

    </head>
    <body>

    <form action="#" onSubmit="test(); return false;">
        <input type="image" class="button" src="img/button-en-send-now.jpg" value="Submit"  />
    </form>

</body>

I even tried it onsubmit and with a button. 我什至在提交时尝试了一个按钮。 Of course I used a function for this. 当然,我为此使用了一个函数。 I also did my homework and searched the web first. 我也做了作业,并首先在网上搜索。 I know there is this hack with the jssvr32 javascript.dll (or something like that). 我知道jssvr32 javascript.dll(或类似的东西)存在这种黑客攻击。 It doesn't work at all. 它根本不起作用。

I changed my security properties to the lowest level possible, it doesn't work. 我将安全属性更改为可能的最低级别,这是行不通的。 I reloaded the page a thousand times, cleared the cache every time. 我将页面重新加载了一千次,每次都清除了缓存。 Reinstalled every version of the browser, it DOES NOT work :( 重新安装了每个版本的浏览器,它不起作用:(

Has anybody any clue and recent problems with it? 有任何线索和最新的问题吗?

Edit: Here is the full code, but as I said, I've already tried several things and this is the code which should just alert a simple "hi". 编辑:这是完整的代码,但是正如我说的,我已经尝试了几件事,并且这是应该提醒一个简单“ hi”的代码。 Which it doesn't do -.- 它不做-.-

You can use this also this link: http://medienportfolio.bplaced.net/ftpzugriff/pump-guide-english.html 您也可以通过以下链接使用此链接: http : //medienportfolio.bplaced.net/ftpzugriff/pump-guide-english.html

Do you, by chance, work on a domain or host that has an underscore in it? 您是否偶然在包含下划线的域或主机上工作? If yes, please be aware, that IE does not execute javascript on hosts with a underscore or any charcter that IE finds exotic. 如果是,请注意,IE不会在带有下划线或IE发现异常的字符的主机上执行javascript。 This also includes subdomains. 这也包括子域。

We had this problem with a subdomain/hostname where the machine was named customer_cms.domain.com. 我们在子域名/主机名中遇到了此问题,其中计算机被命名为customer_cms.domain.com。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM