layer弹窗
作者:互联网
<link rel="stylesheet" href="assets/css/layui.css" th:href="@{/assets/css/layui.css}">
<link rel="stylesheet" href="assets/css/admin.css" th:href="@{/assets/css/admin.css}">
<dd><a href="javascript:;" th:onclick="|modify()|">修改密码</a></dd>
<script th:inline="javascript">
//获取应用路径
var contextPath = [[${#request.getContextPath()}]];
</script>
<script>
function modify() {
//页面层
layer.open({
type: 2,
skin: 'layui-layer-rim', //加上边框
area: ['500px', '360px'], //宽高
content: contextPath + '/a/user/modify' //跳转到后台控制器路径,从控制器路径加载html视图页面
});
}
</script>
标签:layer,contextPath,路径,modify,控制器,弹窗,页面 来源: https://blog.csdn.net/a2813176983/article/details/104834526