我正在尝试在 firefox 中使用 firebug 调试以下 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>
<title>Debug: Times Table 2</title>
<script type="text/javascript">
function writeTimesTable(timesTable)
{
var counter;
var writeString;
for (counter = 1; counter < 12; counter++)
{
writeString = counter + " * " + timesTable + " = ";
writeString = writeString + (timesTable * counter);
writeString = writeString + "<br />";
document.write(writeString);
}
}
</script>
</head>
<body>
<script type="text/javascript">
var timesTable;
for (timesTable = 1; timesTable <= 12; timesTable++)
{
document.write("<p>")
writeTimesTable(timesTable)
document.write("</p>")
}
</script>
</body>
</html>
当我在第二个for循环设置断点并重新加载浏览器重新加载页面而不停止执行时。但是在使用 web 检查器的 chrome 中它工作得非常好
怎么了