jquery easyUI怎么实现这个功能

jquery easyUI怎么实现这个功能,第1张

//添加新的手风琴风格菜单 function addMenu(data, sysName) {var menuList = "" //回圈全部模组菜单讯息$.each(data, function (i, objOne) {menuList = "" //回圈某个模组下所有菜单讯息$.each(objOne.MenuInfo, function (j, objTwo) {if (objTwo.PackageUrl != "") {menuList += " " + objTwo.MenuName + "" }else {menuList += " " + objTwo.MenuName + "" }}) menuList += " " $('#divMenuDetail').accordion('add', {title: " + objOne.MenuModelName + "", //菜单模组名称content: menuList, //本模组菜单清单selected: false}) }) var pp = $('#divMenuDetail').accordion('panels') var t = pp[0].panel('options').title $('#divMenuDetail').accordion('select', t) }这是我自己用的easyUI动态生成两层菜单前台JS方法你需要用ajax去后台抓出两层菜单传到前台,objOne是第一层,objTwo是第二层,参考一下

   //前台需要参数指定调用一般处理程序里哪个方法         

            public string UploadFile()

            {

                string result="上传成功"

                try{

                    //接收上传后的文件

                    HttpPostedFile file = Context.Request.Files["imgPath4"]

        

                    //获取文件的保存路径

                    string uploadPath = HttpContext.Current.Server.MapPath("~/_data/Files")

                    string fileEx = Path.GetExtension(file.FileName)//文件的格式

                    string dtStr = file.FileName.Replace(fileEx, "_") + DateTime.Now.ToString("yyyyMMddhhmmss")

                    //判断上传的文件是否为空

                    if (file != null)

                    {

                        if (!Directory.Exists(uploadPath))

                        {

                            Directory.CreateDirectory(uploadPath)

                        }

                        //保存文件

                        file.SaveAs(HttpContext.Current.Server.MapPath("~/_data/Files/" + dtStr + fileEx))

                        filePath = HttpContext.Current.Server.MapPath("~/_data/Files/" + dtStr + fileEx)

                    }

                }

                catch (Exception ex)

                {

                    result="上传失败"

                }          

                return result

            }


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/bake/11628098.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-17
下一篇 2023-05-17

发表评论

登录后才能评论

评论列表(0条)

保存