如何在TampermonKey脚本上解决问题
我正在使用TampermonKey脚本,但我有这个错误。我不知道如何解决此问题。
document.onkeypress = async function(e) {
e = e || window.event;
var charCode = (typeof e.which == "number") ? e.which : e.keyCode;
if (String.fromCharCode(charCode) === '=') {
const {
value: formValues
} = await Swal.fire({
title: 'Enter your credentials ',
html: '<input id="swal-input1" class="swal2-input" placeholder="email"
type = "text"
value = "[email protected]" > ' +
'<input id="swal-input2" class="swal2-input" placeholder="password"
type = "password"
value = "A23@" > ',
focusConfirm: false,
preConfirm: () => {
return [
document.getElementById('swal-input1').value,
document.getElementById('swal-input2').value
][![enter image description here][1]][1]
}
})
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试使用``...';
您可以在JavaScript中搜索模板字符串。
另外,您可以尝试以下;
Try to use ` ... ` ;
You can search about template string in javascript.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
Also, you can try like below;
该脚本似乎缺少
+
符号...The script seems to be missing a
+
symbols ...