What Console.log is, is actually a print JS array and the function of the image, it is like PHP print_r,var_dump. Console.log This function itself has nothing to say, this blog tells you how to use this function. Before I say this function, I want you to use the most view JS output, is alert bar, but alert, can only play string or int
One, test file test.html
<HTMLxmlns= "http://www.w3.org/1999/xhtml"><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" /><title>Console.log Test</title></Head><Scripttype= "Text/javascript">varTestobj= { 'ID': 1, 'content': 'Test', 'FirstName': function() {document.getElementById ('FirstName'). Value= "Zhang"; }, 'LastName': function() {document.getElementById ('LastName'). Value= "Ying"; } };<!--Print to Image -Console.log (testobj);</Script><Body> <inputtype= "text"ID= ' FirstName 'name= "FirstName"value= ' '> <inputtype= "text"ID= ' LastName 'name= ' LastName 'value= ' '></Body></HTML>
Second, chrome development tools to view JS image
Console Chrome
Now the chrome developer tools and Firebug, I use half-to-half. Chrome developer Tools, there is also a feature that Firebug does not have.
The console can run JS, if this page is an IFRAME, Firebug can only run on the parent, and chrome can choose the page inside the execution, if
Chrome IFRAME Console
Three, Firebug view JS pair image
Firebug Console
JS Console.log Print pairs of image arrays