Firebug 给了我奇怪的行为,我不知道我的代码是否有问题,或者它是否是 firebug 中的错误。
我遇到的问题是萤火虫不会在一个简单的断点上停止。但是,如果我添加一个 watch 表达式,它确实向我展示了它的价值,所以我知道我的代码正在运行,并且这里必须有其他东西在起作用。
代码:
<!DOCTYPE html>
<html lang="nl">
<head>
<title>DOM API</title>
<meta name="keywords" content="t.a.v. klant: plaats keywords gescheiden door een comma">
<meta name="description" content="t.a.v. klant: Wordt gebruikt door google als omschrijving in de zoekresultaten">
<meta name="author" content="klantnaam">
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/nav-popup.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Lato:700,400' rel='stylesheet' type='text/css'>
<link rel="shortcut icon" href="http://www.site.nl/images/favicon.ico">
<link rel="apple-touch-icon" href="images/ios-icon.png"><!--ios web app icon 114x114-->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta charset="UTF-8">
<meta name="robots" content="all">
<script src="js/jquery-1.10.2.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<!--pluginSyntax-->
<script type="text/javascript" src="js/pluginSyntax/scripts/shCore.js"></script>
<script type="text/javascript" src="js/pluginSyntax/scripts/shBrushJScript.js"></script>
<script type="text/javascript" src="js/pluginSyntax/scripts/shBrushXml.js"></script>
<script type="text/javascript" src="js/pluginSyntax/scripts/shBrushCss.js"></script>
<script type="text/javascript" src="js/pluginSyntax/scripts/shBrushJScript.js"></script>
<link type="text/css" rel="stylesheet" href="js/pluginSyntax/styles/shCoreDefault.css"/>
<script type="text/javascript">SyntaxHighlighter.all();</script>
<!--pluginSyntax-->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<!--level1-->
<div class="level1">
<!--level1-->
<h1>DOM</h1>
<p>The Document Object Model (DOM) is a programming interface for HTML. It provides a structured representation of the document (a tree) and it defines a way that the structure can be accessed from programs so that they can change the document structure, style and content. The DOM provides a representation of the document as a structured group of nodes and objects that have properties and methods.</p>
<p>In the DOM every part of a web page is represented as a <code>node</code>. There are 3 nodes:</p>
<ul id="jow">
<li><code>Element</code> nodes (h1 tag)</li>
<li><code>Attribute</code> nodes (class="heading")</li>
<li><code>Text</code> nodes (Title of this tutorial)</li>
</ul>
<!--level1-->
</div>
<!--level1-->
<script>
var ieps = document.getElementById("jow");
for (var member in ieps){
if(ieps.hasOwnProperty(member)){
alert(ieps[member]);
}
}
</script>
我在 var ieps 的声明上设置了一个断点,并且 offcourse firebug 并没有停在那里,只是重新加载页面。
有任何想法吗?
谢谢...