最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How can I see the output of console.log()? - Stack Overflow

programmeradmin4浏览0评论

I am using this code:

<script type = "text/javascript">
 console.log("hello world");
</script>

How can I see the output of console.log()?

I searched on Google but did not find a solution.

I am using this code:

<script type = "text/javascript">
 console.log("hello world");
</script>

How can I see the output of console.log()?

I searched on Google but did not find a solution.

Share Improve this question edited Nov 21, 2012 at 9:44 Joachim Sauer 308k59 gold badges566 silver badges621 bronze badges asked Nov 21, 2012 at 9:41 Php PhpPhp Php 1271 gold badge4 silver badges10 bronze badges 1
  • 1 Press F12, check the "Console" tab. – Sjoerd Commented Nov 21, 2012 at 9:42
Add a comment  | 

8 Answers 8

Reset to default 7

You can open the error console, depending on your browser. (Ctrl+Shift+J in Firefox, or F12 in Chrome, for example). Most browsers have the console hidden in their developer tools.

The console.log(); statement prints anything in the browser console.

Look for Developer Tools or Simply Tools menu in all major browsers.

If you are using Google Chrome the press Cntrl+shift+j to see console.

In Firefox, press Ctrl+Shift+I and click on Console to view the console on Firefox.

You need to view the result in the console. Open the console.

Also, you have a problem with your code.

<script type = "text/javascript">
console.log("hello world");
</script>

Is not valid. Remove the spaces in the script tag, like this:

<script type="text/javascript">
console.log("hello world");
</script>

press F12 in google chrome and click on console to see the output

  1. Open firefox
  2. Go to tools and then add-on.
  3. Search and install an add-on named "firebug"
  4. before reloading your page open firebug and go to console tab.
    You will see your desired result. If you have chrome then its already there. just use it

first of all console.log() of javascript cannot be outputed in your..

you need the javascript console to output it

first

press F12 then click the console label

before refreshing the browser to see your output..

but if your console.log() alternatives for browser is document.write();

You can add a chrome extension named "console log viewer" and then you can see the logs even without opening the developer tool

For Chrome browser follow these steps:

  1. click on More tools on the right side of the top
  2. click on Developer tools
  3. click on console
发布评论

评论列表(0)

  1. 暂无评论