Jsp parameters jump to a joint solution to another jsp page

/ ** 
 * Modify the click trigger event 
 * @param the Data
  * / 
function Change (courseid) { 
    // the acquired courseid passed to the session 
    sessionStorage.setItem ( "courseId" , courseid);
     // jump to modify the page 
    = window.location.href "$ {} /admin/jsp02/alterCourse.jsp sessionScope.path" ; 
}

This is above a trigger button, you can set the onclick event

$ (SessionScope.path) / here to write the relative path of the page jump

 

Acquisition method, here I am writing a function that returns the data, x ()

 function x(){
            var data = sessionStorage.getItem("courseId");
           return data;
        }

 

  IF (X () == null || X () == "" ) { 
                Alert ( "Click the Edit button corresponding to the program" ); 
                window.location.href = "$ {} sessionScope.path / ADMIN / jsp02 / index .jsp " ; 
            } the else { 
                A (); 
            }

Here is the path to avoid writing errors reported directly on the page address, send a null value in the past

 

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/bichen-01/p/11819159.html