0
@RequestMapping("/toTicketRuleSetting/{ticketTypeId}")
public String goToAssistSecretary(@PathVariable("ticketTypeId") long ticketTypeId, ModelMap model) {
model.put("ticketTypeId", ticketTypeId);
model.put("tabId", 0);
return "backend/basic/ticketRuleSetting";
}
在spring mvc中,tabId在模型中會返回jsp頁面, 我想通過javascript在我的jsp頁面中獲取tabId,我該怎麼辦? 這裏是我的jsp頁面中的javascript代碼:如何通過javascript在jsp中從服務器獲取屬性?
window.onload = function(){
<c:set var="tabId" value="${tabId}"/>
<c:if test = "{tabId.value==5}">
$("#tabs").tabs("option", "active", 5);
</c:if >
};
請幫幫我!