gpt4 book ai didi

javascript - Jquery UI对话框关闭函数 "Uncaught SyntaxError: Unexpected identifier"

转载 作者:行者123 更新时间:2023-12-03 02:31:12 44 4
gpt4 key购买 nike

这是我在 js 文件中的代码。

<script> 
var originalContent;
$( ".location-edit-form" ).dialog({
autoOpen: false,
show: {
effect: "blind",
duration: 500
},
hide: "puff",
width:500,
position: {
my: 'center',
at: 'top',
of: $('.display')
}
open : function(event, ui) {
originalContent = $(".location-edit-form").html();
},
close : function(event, ui) {
$(".location-edit-form").html(originalContent);
}
});
</script>

一切正常,直到我不得不使用“打开和关闭功能”。
它显示“未捕获的语法错误:意外的标识符”。

顺便说一句,我使用的脚本的顺序如下
jquery-3.2.1.min.js
bootstrap.js
tether.min.js
jquery-ui.js
ckeditor.js
ckeditor/adapters/jquery.js

最佳答案

看起来你忘记了逗号

<script> 
var originalContent;
$( ".location-edit-form" ).dialog({
autoOpen: false,
show: {
effect: "blind",
duration: 500
},
hide: "puff",
width:500,
position: {
my: 'center',
at: 'top',
of: $('.display')
}, // You forgot it here
open : function(event, ui) {
originalContent = $(".location-edit-form").html();
},
close : function(event, ui) {
$(".location-edit-form").html(originalContent);
}
});
</script>

关于javascript - Jquery UI对话框关闭函数 "Uncaught SyntaxError: Unexpected identifier",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48726746/

44 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com