Home > Back-end >  How to put the same data values of a field in the table in the JSP and the comparison results to ano
How to put the same data values of a field in the table in the JSP and the comparison results to ano

Time:09-25

new small white, examples may not be appropriate,
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 the
Two 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 ");
  • Related