The address format of the action in form form "__url__/edit/{xxx}", "xxx" in curly braces is the variable name, and the main function is to use it together with the table component.
The deletion, editing, and modification of passwords are replaced with URL variables:
Delete, edit, modify password using the variable {sid_user}, especially note that the variable named format, must start with "Sid_" , so the background can be directly in the variable "Sid" receive.
<tbody> <tr target= "Sid_user" rel= "<%= value%>" >
When a row is selected, the Rel value on the TR is automatically replaced with the URL variable.
code example:
1 <aclass= "Delete"href= "__url__/foreverdelete/{sid_user}"Target= "Ajaxtodo"title= "Are you sure you want to delete it?" "warn= "Please select User"><span>Delete</span></a>2 3 <aclass= "Edit"href= "__url__/edit/{sid_user}"Target= "Dialog"Mask= "true"warn= "Please select User"><span>Edit</span></a>4 5 <aclass= "icon"href= "__url__/password/{sid_user}"Target= "Dialog"Mask= "true"warn= "Please select User"><span>Change Password</span></a>6 7 <Tableclass= "List"width= "100%"Layouth= "The ">8 <thead>9 <TR>Ten <thwidth= "$">Number</th> One <thwidth= "+">User name</th> A <th>Nickname</th> - <th>Email</th> - <thwidth= "+">Add Time</th> the <thwidth= "+">Last Login</th> - <thwidth= "a">Number of Logins</th> - <thwidth= "a">State</th> - </TR> + </thead> - <tbody> + <volistID= "Vo"name= "List"> A <TRTarget= "Sid_user"rel= "<%= ID%>"> at <TD><%=ID%></TD> - <TD><%= Account%></TD> - <TD><%=Nickname%></TD> - <TD><%=Email%></TD> - <TD><%=create_time%></td> - <TD><%=last_login_time%></td> in <TD><%=Login_count%></TD> - <TD><%=Status%></td> to </TR> + </volist> - </tbody> the </Table>
Note: The URL variable name {sid_user} and TR's target="Sid_user" remain consistent.
In the recent work process, found a bug, I wrote the form form of the action "action= ' # '", through the JS event to change the action value, but if you do not select the list item directly click on the new or delete button, the page does not normally prompt "Please select information" prompt, But directly in the pop-up layer to load the home page, and then through the leadership of the guidance to find that is because I wrote the cause of the action; later, in order to ensure that JS dynamically change the action address while implementing the function of pop-up reminders, I will default to the action value of "action={sid_ User} "format, which finally implements the requirements in advance.
Variable substitution of URLs in the form form of DWZ