Home > Article > Web Front-end > JavaScript method to print debugging information (Jquery)
Use alert to output information every time. The amount of information is small and debugging is inconvenient. There is such a method that can write js code better. Because Jquery is used more, I only wrote the debugging method of Jquery. You can also follow your own preferences. , add time before debugging information
/**
* Print JavaScript debugging information, use absolute positioning, and print one empty line each time
*/
function plInfo(obj){
if($("#show").length==0)
$("body").append ("
/**
* Print JavaScript debugging information, use absolute positioning, and the information printed each time should not be a blank line, and should be connected with --
*/
function plInfoNoBR(obj){
if($("#show").length==0)
$("body").append("