问题遇到的现象和发生背景
<script src="{% static 'js/jquery.min.js' %}"></script>
<link rel="stylesheet" href="{% static 'css/dialog.css' %}">
输入的密码值如何传回后端
问题相关代码,请勿粘贴截图
<i class="iconfont icon-xiongmao" id="openDialog"></i>
<script type="text/javascript">
$("#openDialog").dialog({
id: "010Editor", //必填,必须和已有id不同
title: "请输入密码", //对话框的标题 默认值: 我的标题
type: 0, //0 对话框有确认按钮和取消按钮 1 对话框只有关闭按钮
easyClose: true, // 点击遮罩层也可以关闭窗口,默认值false
form: [{
description:"密码",
type: "text",
name: "password",
value:""
}], //form 是填充表单的数据,必填
submit: function(data) {
//data是表单收集的数据
console.log(data);
}
})
</script>
运行结果及报错内容
我想要达到的结果
传入后端处理密码