javascript - 标识符已使用 .html(data) 声明
问题描述
每次单击侧边栏的按钮时,此功能都会运行:
function loadContent(event, tabName){
$("#pane").empty()
if(event !== undefined && tabName !== undefined){
oldTabname = tabName
$("#pane").load(tabName)
}
else{
$.get(oldTabname).done(function(data){
$("#pane").html(data)
})
}
}
but when the tab load, if this tab contains any require inside of the js file equals the last tab it gave the error: SyntaxError: Identifier has already been declared.
有什么方法可以清除 div 窗格?
解决方案
推荐阅读
- flutter - 在我的颤振应用程序中,我有 2 个函数 .. 第二个函数依赖于第一个函数,但问题是第二个函数在第一个函数之前执行
- firebase-authentication - 错误:发生不可恢复的登录失败错误代码 12500
- android - 使用 Node Js 将 Postgresql 链接到 Android Studio
- react-native - 如何在 .map 上的多行上呈现我的文本?
- yocto - 无法获取源文件
- azure - Azure 数据工厂管道并发问题
- python - 从谷歌地图距离矩阵 API 检索历史数据?
- html - 如何选择所有嵌套段落?
- reactjs - React - 内容变得可见后重新渲染
- json - 通过 api 调用部署预定义数据的最佳方式是什么?