[color=blue] recently updated [/color]
[color=blue] 1. to increase the console "minimization / restore" Switch Icon [/color]
[color=blue] [/color]
[color=blue] 2. split the internal logger.js into logger.js, logger-base.js, logger-core.js, refactoring the resource loading mode, and automatically select the appropriate resources for loading the corresponding resources.[/color]
[color=#0000ff] 3.IE5, IE6, IE7, IE8, logger.js, compatible and compatible resources R]
creativity unlimited, simple and practical javascript-logger tool - Kingfishers
project release address and v1.0.3 download address: [url=http://code.google.com/p/kingfishers/: 1ij71iz2]http://code.google.com/p/kingfishers/[/url:1ij71iz2]
v1.0.3 online demonstration: [url=http://kingfishers.googlecode.com/svn/trunk/Kin Gfishers/kingfishers/example.htm:1ij71iz2]http://kingfishers.googlecode.com/svn/trunk/Kingfishers/kingfishers/example.htm[/url:1ij71iz2]
[url=http://kingfishers.googlecode.com/svn/trunk/Kingfishers/kingfishers/example.htm:1ij71iz2][/url: 1ij71iz2] [url=http://kingfishers.googlecode.com/ Files/Kingfishers-1.0.3.rar:1ij71iz2][/url:1ij71iz2]
QUOTE:
[color=#008000]function[/color], object, JSON, JS basic types and so on..
color can be a color name, such as yellow; also can It is the value of the color, such as #0000ff
note: this component rewrites the default alert method, and can call the output information interface by passing two parameters, such as alert (Arg, color)
[code].lt;! Ingfishers component, unzip the contents of the core folder into the project, such as the
project/js/debug/logger.css -CSS style file (enabled=false does not load the file)
/logger.js - core JS loader (loaded self deletions) 2K
> /logger-base.js - core JS basic function library 7K
/logger-core.js - core JS Library (enabled=false does not load the Library) 44K
/Highlighter.js - code highlighting component (highlighter=false does not load the Library)
/images/ - skin folder
/dlg-bg0.gif - blue skin picture file 1
/dlg-bg3.jpg - blue skin picture file 2
/dlg-bg4.jpg - blue skin picture file 3
/dlg-bg5.gif - blue skin picture file 4
/dlg-bg1.gif - yellow skin picture file
/dlg-bg7.png - red skin picture file
/dlg-bg8.png - pink skin picture file
project/WEB-INF/
/classes
/lib
in the header page of the project, introduce a single row of logger.js script label
second steps: basic functions use the description of output / > > > > DOM elements, function, object, JSON, JS basic types and so on..
color can be a color name such as yellow; or a color value, such as #0000ff
note: the component rewrites the default alert method, and can call the output information interface by passing two parameters, such as alert. Br />
.lt; script type=.quot; text/javascript.quot; src=.quot; http://kingfishers.googlecode.com/files/loader.js.quot;.Gt;.Lt; /script.gt;
my.prototype.write = function () {}
var myo = new my (); Output yellow.#91 with $alert; default color.#93; Hello World string
$alert (.Quot; Hello world.quot;.Quot; #ffffff.quot;); / / / / / / output component core library. / / output function method my
$alert (myo); / / / / output function method my
.lt; /script.gt; [/code]
> about / > / / / / or - -- / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / A tool written in JavaScript language to replace the alert,
in the browser continuously output the client JavaScript script to run the log.
is mainly used for client script analysis and error checking.
the name of its own tool is kingfishers (Cui Niao), the meaning of the delicate inhabit of your project.
only the ideas and creative works will be more powerful! After the kingfishers-1.0 version of the prototype,
will continue to make it more simple and practical, and strive to be perfect. The
with the client technology In the process of JavaScript development, if alert is always used for program tuning,
is difficult to meet the needs of enterprise development.
for example, in a Ajax project, the client has a custom three thousand or four thousand line JS file, which contains a variety of custom JavaScript objects. In the process of
analysis and error checking, it is always necessary to monitor the value or state of a custom object when the JS program executes to a key point, to determine whether the execution results are expected.
there are two obvious shortcomings in the way of using Alert:
1. if there is a value of N key points in one execution. All you want to watch at any time, use alert you don't have enough n confirmation,
- the developer's feeling is very disconnected and not intuitive, it's hard to smooth out the hidden problems.
2. for debugging alert statements, when the release must be deleted, and when one day needs to debug again,
- you have to recall the key points before, respectively, alert, difficult debugging.
in view of the above requirements, in the light of the principle of simple and practical, this JavaScript debugging tool has been written by yourself. After
the use of the tool, the above two problems have been solved. You may find that JavaScript is not difficult to detect on the client side.
the tool has the following characteristics:
1. is completely plug-able, and has no negative effect on the target program.
[can be tested and validated in the {example\basic\10.log tool parameter test.Html} page]
2. is simple and convenient to use. Only a single line of JS code is needed to do everything.
[using the examples to refer to the {example\basic} directory's resources]
all core programs including
1) core script file: logger.js [must]
2) related pattern files: logger.css [must]
3) code highlighting engine file: Highlighter.js [optional] When starting the parameter highlighter=false, it does not require the file
directory description:
1) example\basic: using the example
2) example\xhtml: W3C standard compatibility test
3) readme: use the description
/ / / / / / / / / / / / / / / / / / 3) readme: use the description
/ / / / / / / / / / / / / / / / / / / 3) readme: use the description
/ / / / / / - - / / / /
Kingfishers parameter specification
/ / / / / / / / / / / / / / / / / / /
moveborder = true / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / moveborder = true / / / / > grayout = true / / (optional) whether the underlying page element is gray when dragging the log Console: true (default) / No: false
targetdiv=.quot; myDiv.quot; / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / Color II 3: blue III is not set (default): white corner simple style
debug = true / / / / (optional) supports code execution function: true (default) / No: false
.Gt;
note:
1. parameter enabled=false,
(1) the rest of the parameters are invalid. IV will not be created in the current document's body.
(3) no logger.css resources are loaded in the current document. When the
2. parameter highlighter=false,
(1) does not load the Highlighter.js resource / > (2) when the current document is triggered and the page code output to the console is not highlighted. When the R />3. parameter ContextMenu = false,
(1) right key DIV will not be created in the current document body.
(2) is right-click on the tool and does not pop up the tool custom right button menu. When
4. parameter cookie=true, when you / > move or adjust the size, the location and size information of the console will be recorded to In cookie, when the page is refreshed, the log console always keeps the position before the refresh, the size of the
5. parameter skin = false, the color of the
right menu's complexion always uses the color configured in logger.css. When the parameter skin = true is
, the
right menu skin color switching mode can run in Line setting, including the skin color mode and the skin color mode. When the
6. parameter suspended=false, the console's floating feature is invalid. When the
parameter suspended=true, the scrollbar event causes the console to automatically float to the visual field when it is not within the visual range. The remaining parameters of the
7. are well understood. Without detailed description of.
/ > / / / > / / / / / / / / / / / / / / / /
it is also important to be able to print the information at any point at any time, and to ensure that after Release,
no impact on the performance of the target script is a matter to be considered.
the print interface provided by this tool is $Log.loginfo (MSG, color); //msg: output information body color: information, the color
Kingfishers does not want to force you to adapt, you can choose the way you like to use it.
if you carefully read the {Kingfishers parameter instructions} section, you should be very easy Where Kingfishers flash is found,.
you can also choose the following two ways to use Kingfishers.
mode one:
if Kingfishers is used in your project, when your project Release,
you only need to set the enabled parameter to false, no need to delete the list. The debug code in the standard program, Kingfishers does not have any impact on the performance of the target JS program;
[on this you can test and confirm in the {example\basic\10.log tool parameter test.Html} page]
when your project needs to be debugged again, you only need to set the enabled parameter in the script tag to true You can.
mode two:
if your project release, you want to add Kingfishers to the script tag in the target program, and you can also select
to restructure a similar method in your program with random names. For example:
function $alert (message, color) {$Log.logi. NFO (message, color);}
use the $alert method in your project to output the log. You can publish your project according to the following steps:
1) add Kingfishers to the script tag in the target program to delete
2) and modify the implementation of jsOut method, such as
function. R) {}
effect diagram: