jQuery警告框不会出现

let*_*ngo 0 jquery

我被困在这里大约一个小时.我有以下代码,加载alert页面时不加载框.

我试过两台不同的机器但没有用(两台机器都使用了Chrome和FF).

<!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><?php echo $pageTitle; ?></title>

  <link href="../css/style.css" rel="stylesheet" type="text/css" media="all" />
  <link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
  <!--[if !IE 7]>
    <style type="text/css">
        #wrap {display:table;height:100%}
    </style>
  <![endif]-->

  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
  <script type="text/javascript">
  $(document).ready(function() {
      alert("hello");
  }
  </script>
</head>

<body>
  ...
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

Eri*_*tis 8

$(document).ready(function() {
    alert("hello");
});                     //note this line
Run Code Online (Sandbox Code Playgroud)

  • 花了整整一个小时,我设法擦除了关闭标签,剥离了一切......另一个快乐的深夜编码.谢谢 :) (2认同)