How to execute Javascript code in Chrome console? -


I have a small application that generates some JavaScript code, which can be executed on websites. To execute this code I am using a browser console and it works well for Firefox, but I do not know how to work with Chrome browser.

I have this javascript code in Firefox:

  javascript: var els = document.getElementById ('video'); Els.style = "" var none = document.getElementById ('slika'); None.style = "display: none;" I open the console (CTRL-SHIFT-K), paste it, press Enter, and then the code is working. I get the console in the address bar (CTRL-SHIFT-J) Tried with Chrome through, but nothing happened. If I'm trying in the console, I get this line:  
  "display: none;"   

What's standing for it? Is there a syntax error?

If I try in the address bar, then the browser redirects me to Google and executes a query with the javascript code as the search value :)

Chrome Stuck with me ...

Can anyone help me, please? Thanks a lot!

You do not need javascript: prefix if you enter the code in the console are doing.

Besides, I'm not sure if none.style = "display: none;" is valid. Try none.style.display = "none" if you are having problems with it.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -