1. 超链接调用
<td><a href="<c:url value="/book/detail/${book.id}"/>">${book.title}</a></td>
<span style="font-size:14px;">@RequestMapping(value = "/book/detail/{bookId}")
public String details(@PathVariable("bookId") long bookId, Model model) {
Book book = this.bookstoreService.findBook(bookId);
model.addAttribute(book);
return "book/detail";
}</span>
2. JS调用
<td style="cursor: pointer; color: blue;"
οnclick="toGatherData('${tab.id}')" align="left" class="tdPadding">${tab.name }</td>
function toGatherData(tableId) {
var sel = document.getElementById("sel" + tableId);
var period = sel[sel.selectedIndex].value;
var url = WEB_PATH + "data/gather/gatherInterface.do?tableId=" + tableId
+ "&period=" + period;
//alert(url);
openWindow(url, "gatherWin", null, null, 1);
}