We usually use a lot of JavaScript code in the development of our website,
To debug, there are many debugging methods, used to be the Firefox browser debugging tools, but later versions, and so on the reasons can not be used,
Now use debugger in Google browser to debug.
The following JS code:
Query method implementation
function search () {
debugger;
var url = ' ${base}oa/dbkh!listdata.action ';
var starttime=$ (' #startTime '). Val ();
if (starttime==null) {
starttime= "";
}
var username =$ (' #username '). Val ();
JQuery ("#role_list_table"). Jqgrid (' Setgridparam ', {
URL: "${BASE}OA/DBKH!LISTDATA.ACTION?ENDSTR = + 1 +" & Starttime= "+ starttime+" &username= "+ username,
page:curpagenum
}). Trigger (" Reloadgrid ");
Run the project in Google Explorer, open the F12, enter the criteria, and click the "Query" button to return to the following figure:
Then use F8,F10,F11 for debugging, as shown in the following figure:
In the process of debugging will be the value of the variables and so on, so that in the process of looking for bugs will be more convenient.