recently encountered a JS problem in the self-learning Django framework. I don"t know whether it is because the browser does not support it or whether it is written by its own code
Please take a look at
html code
<p class="text-right">
<button id="add_column" onclick="add_column()" class="btn btn-primary"> add column </button>
JS Code
<script type="text/javascirpt" src="{% static "js/jquery.js" %}"></script>
<script type="text/javascirpt" src="{% static "js/layer.js" %}"></script>
<script type="text/javascript">
function add_column(){
var index = layer.open({
type: 1,
skin: "layui-layer-rim",
area: ["400px","200px"],
title: "",
content: "<div class="text-center" style="margin-top:20px"><input type="text">
</div>",
btn: ["",""],
yes: function(index, layero){
column_name = $("-sharpid_column").val();
alert(column_name);
},
btn2: function(index, layero){
layer.close(index);
}
});
}
</script>
error message