我有以下的html。它通过了W3验证器,但我的JavaScript警告不起作用。任何人都可以看到任何问题或有任何建议如何让它的工作?为什么我的javascript不起作用
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Company Name™</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<style type="text/css">
BODY {
background-image: url(images/bg4.jpg);
background-repeat:no-repeat;
background-position:center top;
background-attachment: fixed;
}
</style>
<script type="text/javascript">
alert("HELLO");
</script>
</head>
<body>
<div id="wrapper">
<div id="header">
<div class="logo">
<img src="images/fcflogo.png" width="295" height="100" align="left" alt="logo"/>
</div>
<div class="header1">
<a href="financialprotection.html">100% Financial Protection</a>
<hr/>
</div>
<div class="nav">Home| Flights| Hotels| Villas | CarHire| Attractions| Contact</div>
</div>
<div class="ver1">
<h2>Can't find what your looking for?</h2>
</div>
<div class="enq1">
<h2>Enquiry Form</h2>
</div>
<div class="hor1">
<h2>Our Service</h2>
<a>Company Name are one of the leading independent travel companies specialising in Florida Holidays. We have a wide range of major Charter and Scheduled airlines to choose from as well as over 10,000 Hotel and Villa deals. Our aim is to provide you the customer with a truly fantastic vacation in Florida from start to finish at affordable prices. We are not committed to any airline or Tour operator so are totally committed to finding you the best deal.</a>
</div>
<div class="hor1"><a>FLIGHTS</a></div>
<div class="ver2"><a>HOTELS</a></div>
<div class="ver2"><a>VILLAS</a></div>
<div class="hor1"><a>CAR HIRE</a></div>
<div class="hor1"><a>ATTRACTIONS</a></div>
</div>
<hr/>
<div id="footer"><a>FOOTER</a></div>
</body>
</html>
编辑 - 下面的所有,我必须启用JavaScript,我使用Debian与Firefox,NoScript的是残疾人,但警报并未出现,即使我将它移动到身体。
它适用于Windows 7和Google Chrome 7的操作系统。您使用的浏览器,浏览器版本和操作系统是什么?您是否在不同的浏览器上测试了这个版本? – 2010-09-19 13:46:23
如果您正在讨论警报“HELLO”),这工作得很好,你期望它做什么,它不是在做什么? – Robusto 2010-09-19 13:48:23
警报不会出现在我身上。我正在使用Linux(debian)和firefox。我也在chrome中测试过,它不工作。 – 2010-09-19 13:57:29