页面中使用sweetalert做了个弹窗,调用的时候报错:Uncaught ReferenceError: logStr is not defined
<td><%=PstName(entitys[i].BsvPstId) %> [<a href="javascript:SetBsvPst()">修改</a>] </td>
function SetBsvPst() { swal({ title: "输入安全密码", text: "输入安全密码", type: "select", inputOptions: { 'SRB': 'Serbia', // How do I dynamically set value? 'UKR': 'Ukraine', 'HRV': 'Croatia' }, showCancelButton: true, closeOnConfirm: false, confirmButtonText: "确认", cancelButtonText: "取消", animation: "slide-from-top", }, function (inputValue) { $("#PassWord").val(inputValue); if (inputValue) { $("#ParameterForm").ajaxSubmit(function (data) { console.log(data); if (typeof (data) == "string") { data = JSON.parse(data); } if (data.success) { location.reload(); } else { swal("失败了", data.message, "error"); } }) } else { swal("输入不能为空"); } }); }
错误详情: