Edited code won't show up in browser

I’m having trouble finding documentation about this. I’m running Chrome on Windows 7, starting to read up on WebGL. Whenever I take code from existing WebGL programs and save them on my own computer to edit, I can’t run them again locally. Even when I make no changes to the code, all I see on the page is a black box where the canvas should be–nothing is drawn on it. I can’t find anyone who’s had the problem before and posted a solution. Thanks for any insight.