1. 若要使用EasyUI则需要引用EasyUI。
-
下载EasyUI。地址:https://www.jeasyui.cn/download.html
-
下载后解压,将解压后的文件夹复制在项目文件夹中。
-
在项目中显示所有文件,最开始项目中的jquery-easyui-1.9.7文件夹应该是灰的,右键选择包含在项目中。
-
在页面中引用下面css和js文件
<link href="~/jquery-easyui-1.9.7/themes/default/easyui.css" rel="stylesheet" />
<link href="~/jquery-easyui-1.9.7/themes/icon.css" rel="stylesheet" />
<link href="~/jquery-easyui-1.9.7/demo/demo.css" rel="stylesheet" />
<script src="~/jquery-easyui-1.9.7/jquery.min.js"></script>
<script src="~/jquery-easyui-1.9.7/jquery.easyui.min.js"></script>
注:在项目jquery-easyui-1.9.7文件夹中将上述文件直接拉到页面中,href和src为文件路径。
2. HTML页面
@{
ViewBag.Title = "MenuButtonDemo";
Layout = null;
}
<link href="~/jquery-easyui-1.9.7/themes/default/easyui.css" rel="stylesheet" />
<link href="~/jquery-easyui-1.9.7/themes/icon.css" rel="stylesheet" />
<link href="~/jquery-easyui-1.9.7/demo/demo.css" rel="stylesheet" />
<script src=