gpt4 book ai didi

JavaScript 下载链接无效

转载 作者:太空宇宙 更新时间:2023-11-04 13:21:06 24 4
gpt4 key购买 nike

<分区>

我一直在尝试使用 javascript 下载 exe 文件,我以前使用单选按钮来下载,但现在我不知道应该如何下载。场景是有 3 个复选框管理、安全、安全 1 和我应该在点击下载按钮后检查是否选择了哪些复选框组合需要下载不同的 zip 文件。

 <button onclick="
if(!this.form.admin.checked&&!this.form.security.checked&&!this.form.security1.checked)
{
document.getElementById('errfn').innerHTML='Make atleast one selection';

}
else if (this.form.admin.checked&&this.form.security.checked&&this.form.security1.checked == 1)
{
alert('security32 and admin and security64');
}
else if (this.form.security.checked&&this.form.security1.checked == 1)
{
alert('security64 and security32');
}
else if (this.form.admin.checked&&this.form.security.checked == 1)
{
alert('security32 and admin');
}
else if (this.form.admin.checked&&this.form.security1.checked == 1)
{
alert('security64 and admin');
}
else if (this.form.admin.checked == 1)
{
alert('admin is checked');
}
else if (this.form.security.checked == 1)
{
alert('security 32 is checked');
}
else if (this.form.security1.checked == 1)
{
alert('security64 is checked');
}
return false;

">Submit</button>

我已将警报替换为 location.href="images/download.exe";检查它是否被不幸下载

为单选按钮工作的代码是

<input value="1" type="radio" id="1" name="formselector" onclick="displayForm(this)">
function displayForm(c)
{
var radios = document.getElementById("1").value;
location.href="images/WismanWeb 32 bit.exe";
}

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