1 <Scriptlanguage=javascript>2 functionIdentifyrepair (event_id)3 {4 varURL;5 URL= "/view/faultyinfo?event_id=" +event_id;6 window.location.href=URL;7 }8 9functionGeteventid ()10{11varevid_list=Document.getelementsbyname ("evid_list");12varEvid_info= "";13 for(varJ=0; J<Evid_list.length; J++){14Evid_info+=Evid_list[j].value+ " ";15 }16 17varURL;18URL= "/view/faultyinfo?event_id=" +Evid_info;19window.location.href=URL;20} + </Script> A at <Body> - - <Tableclass=titlewidth=700> - <TR> - <TD><b>Fault information</b></TD> - <TDstyle= "Font-size:12px;color: #185A73"Align=rightwidth=*>{% Module Uptime ()%}</TD> in </TR> - </Table> to + <BR> - {% if lists! = []%} the <input type= "button" onclick= "Geteventid ()" value= "Repair All" > * {% END%} $ <BR>Panax Notoginseng {% for D in lists%} - <Tablewidth=900Border=0cellspacing=1cellpadding=1> the <TRID=TBLHDRHeight=22> + <VDBwidth=200Align=center>Time</TD> A <TDwidth=300Align=center>event_id</TD> the <TDwidth=150Align=center>msg_id</TD> + <TDwidth=150Align=center>SEVERITY</TD> - <TDAlign=center> $ {% if d[' event_id ']%} $ <astyle= "COLOR: #0000ff" - href= "Javascript:identifyrepair (' {{d[' event_id '}} ')">Repair</a> - {% END%} the </TD> - </TR>Wuyi the <TRID=row1> - <TDAlign=center>{{d[' time '}}</TD> Wu <TDAlign=center>{{d[' event_id '}}</TD> - <TDAlign=center>{{d[' msg_id '}}</TD> About <TDAlign=center>{{d[' severity '}}</TD><input name= "evid_list" type= "hidden" value={{d[' event_id ']}}/> - - </TR>
With 57 lines of code, each execution of the line code will be event_id into input name= "evid_list"
With 34 lines of code, click Button, execute JS code geteventid (), store all the event_id in the variable evid_info, and finally pass to the background