你好:
以我之前上傳的案例,想要直接跳入第二層的第一項「基本資料」菜單
參考之後改成如下:
if (!this.IsPostBack)
{
// sets the index of the item which submenu you want to show.
int itemIndex = 0; //第一項「基本資料」
var menuId = "\"#" + this.Panel2.ClientID + "\"";
var script = "<script type='text/javascript'>";
script += "$(document).ready(function () {";
script += "$(" + menuId + ").data(\"wijmo-c1menu\")._items[" + itemIndex + "]._displaySubmenu({ target: $(" + menuId + ").find(\"li a\")[" + itemIndex + "] });";
script += "});";
script += "</script>";
this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "showSubMenu", script);
}
再麻煩你指導一下 |