【发布时间】:2020-06-08 13:35:06
【问题描述】:
我想在我的电子项目中集成 jQuery,我需要它,因为我需要运行这段代码
$('#link').on('submit', function (e) {
e.preventDefault();
let $form = $(this),
$select = $form.find('select');
links = $select.val();
if (links.length > 0) {
for (i in links) {
link = links[i];
window.open(link);
}
}
});
我试过这段代码来修复它
<script>if (typeof module === 'object') { window.module = module; module = undefined; }</script>
<script src="scripts/jquery.min.js"></script>
<script src="scripts/vendor.js"></script>
<script>if (window.module) module = window.module;</script>
这是大家都用的,但是不行,希望大家帮帮我。
【问题讨论】:
-
这能回答你的问题吗? Electron: jQuery is not defined
标签: javascript html jquery electron integration