Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

Running Javascript in Navigation Bar (URL)

  • 6 trả lời
  • 1279 gặp vấn đề này
  • 32203 lượt xem
  • Trả lời mới nhất được viết bởi yingted

more options

Question: How can I enable in Firefox (currently 7 - beta) to run javascript in the url bar. I mean running: javascript:alert('iaurt'); in the url bar. I remember this worked on previous firefox versions... And this works in IE but on Firefox it doesn't :(

Tất cả các câu trả lời (6)

more options

You can no longer run JavaScript code via the location bar in Firefox 6 and later.
You can see an error message in the Tools > Error Console.
That code now gets a null principal for security reasons and doesn't have any effect (Bug 656433).
You need to create a (keyword) bookmarklet and run the code by invoking that bookmark.

NoScript can allow you to run such code via the location bar, see:

more options

Killing advanced features because "average" users don't need or can't handle them is becoming Mozilla MO. Bye status bar, bye navigation bar javascript, bye market share, hello "hover a link for 5 minutes and the destination appears where the status bar should be".

At least add about:config entries to restore the useful features that keep being removed.

Được chỉnh sửa bởi fatazize vào

more options

Although entering JS through the URL bar has been disabled for very good security reasons, in the latest Firefox release it's possible to do the same but by different means.

If you go to the "Web Developer" menu (or if you're on a Mac, Tools > Web Developer) and select "Scratchpad" up will pop a box where you can enter some JS, right click and "Run" it on the webpage. The result is exactly the same as one would have by entering stuff into the URL bar.

more options

You can install this add-on: InheritPrincipal :: Add-ons for Firefox

more options

Ctrl+Shift+K

more options

Ctrl+/ without any text selected shows the add-on bar, which is a less powerful version of the status bar.