For example: the lyrics to music information data table fields (varchar - not the primary key), to compare the two songs lyrics are the same, how to choose two songs on the page and to compare the results into the JSP page shows that (I use is the framework of SSM)
CodePudding user response:
Background to write the query, returned to the front desk, front desk js parsing and then placed in a tag to theTwo songs - query twice - write two labels in the value of
Then by comparing with js event string and returns the results
-- -- -- -- -- -- -- to the above-mentioned comparative logic has been achieved and the return comparison results;
The comparison results to another page that I can't imagine the business scenario didn't thinking
About the baidu may use cookies to store; Concrete implementation does not clearly didn't done it
CodePudding user response:
The JSP page 1:
Window. The location. Href="https://bbs.csdn.net/topics/xxx.jsp? id="+id;
The JSP page 2:
The function getUrlParams (name) {
Var reg=new RegExp (" (^ | & amp;) "+ name +"=(/^ & amp; (*) & amp; | $) ");
Var r=window. The location. The search. Substr (1) the match (reg);
If (r! [2]=null) return unescape (r);
return null;
}
Var id=getUrlParams (" id ");