课程: Learning JavaScript Debugging

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Challenge: Knowing when to stop

Challenge: Knowing when to stop

(electronic music) - [Instructor] Here is our first challenge on using breakpoints. We're going to look at a page that has a couple of problems and use what we know about breakpoints to help diagnose what's wrong. Let's start by looking at the page and how to trigger those problems. This is a slightly enhanced version of the Hansel and Petal page that we've been looking at previously, but it has a couple of problems. First, we have a checkout panel over here that slides out when you click the checkout button. If I click that close button, it closes. That all works as we expect, but if I open it again and click this close this panel button, nothing happens. I'm expecting that both of them will work and they should both work using a single handler function. If I open up the developer tools, the code for that is down here at the bottom of the file in one of these script tags. Now, here we go. Here's my checkout…

内容