orzubalsky / creative-computing-2018

0 stars 1 forks source link

How to inspect java script of an web page? #100

Open cuodiao opened 6 years ago

cuodiao commented 6 years ago

I can only see the css and html in the inspect...and now how can I test my java script...? It doesn't work at all TAT

cuodiao commented 6 years ago

function randomNumber (min, max) {
  return Math.floor(Math.random() * (max - min + 1)) + min;
}

var shape = document.querySelector(".shape");
var width = randomNumber(100, 500);
var height = randomNumber(100, 500);

shape.style.width = width + "px";
shape.style.height = height + "px";
cuodiao commented 6 years ago

fine now it works... but I am still wondering about how to inspect java script 🙃

misteakes commented 6 years ago

I'm not sure if this is the right way to do it, but if you go to inspect it, there's going to be options on the top. Click on "Sources" and your js file should be on the left. Hope this helps! :-)

cuodiao commented 6 years ago

wow that works thx!

gallm551 commented 6 years ago

also, when you open web inspector, select console!