【发布时间】:2011-02-07 12:45:53
【问题描述】:
我有这个代码:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript" href="http://code.jquery.com/jquery-1.5.min.js" />
<title>JQuery Demo 1</title>
<style type="text/css">
#box
{
background-color: #ff0000;
}
</style>
<script type="text/javascript">
</script>
</head>
<body>
<div id="box">----Text----!</div>
</body>
</html>
当我包含来自 Google 的 Jquery 文件时,div“框”不再是红色的。当我删除 JQuery 文件时,它再次变为红色。为什么?
【问题讨论】:
-
另外,当我删除: div 完全消失了!
标签: javascript jquery html