Blankman
Blankman

Reputation: 267190

with firefox w/firebug, how can I write javascript in the browser and use the .js file objects also?

With firefox w/firebug, can I type javascript into the browser and test things?

Can I also reference functions/objects from .js files references in the html?

Upvotes: 1

Views: 1440

Answers (3)

Martijn Pieters
Martijn Pieters

Reputation: 1123770

Short answer: Yes, you can, by using the console.

Longer answer: Take a look at the What's new in Firebug 1.6 video, it gives an excellent demonstration on what you can do with the console, including auto-completion of the available variables.

Everything that's available globally in the current document is available to the console. So if you included jQuery on the current page, it'll be accessible from the console too.

Upvotes: 3

Andy
Andy

Reputation: 778

Yes, if you enable the console tab you can use it as a Javascript REPL. From there you should be able to access any variables and objects in the global scope.

Upvotes: 1

Val
Val

Reputation: 17532

yes, you can... while on firebug (1.6.1) click 5th button from the left, its like a bunch of lines, entitled show command line then you will see it.

as for your second question... u can use it as long as it is on the DOM otherwise goodluck to u :)

Upvotes: 0

Related Questions