1 <S:formnamespace= "/TB"Action= "Tenderlist"name= "Searchform"ID= "Searchform">2 <S:hiddenname= "Tbid.city"ID= "Condition1_search"></S:hidden>3 <S:hiddenname= "Tbid.month"ID= "Condition2_search"></S:hidden>4 </S:form>5 6 <ahref= "javascript:;"class= "Condition1">Condition 1</a>7 <ahref= "javascript:;"class= "Condition2">Condition 2</a>8 9 <Scripttype= "Text/javascript">Ten $(function(){ One $(". Condition1"). Click (function(){ A varcondition= $( This). html ();//get the value inside the tag - $ ("#condition1_search"). attr ("value", condition);//Click to upload the value of the tag inside the <s:hidden></s:hidden> - $ ("#searchForm"). Submit (); the }); - $(". Condition2"). Click (function(){ - varcondition= $( This). html ();//get the value inside the tag - $ ("#condition2_search"). attr ("value", condition); + $ ("#searchForm"). Submit (); - }); + }); A </Script>
This is the code for the foreground page. The main thing is that when the mouse click on the search criteria, the value of the condition is obtained first through jquery and then uploaded to <s:hidden></s:hidden>, and the form is finally submitted.
SSH Project linkage of search criteria