1)进入想加密的文件夹里,点击右键:-->自定义文件夹-->下一步-->在弹出的对话窗里:上面选择:“标准” 下面把:"编辑该模板" ---->下一步
----->此时会弹出一个folther.htt文件给你编辑,
2) 如果原来已经存在这个文件,里面会有很多内容,注意找到
<script>
......
...
..
</script>
之间的内容,在任何一个函数后面:例如:
Function SanatizeString(data){
....
...
..
}
//这里输入密码程序
function getpass()
{
var PW=prompt("Please Input Your Password:","");
if (PW!="你的密码")
{
alert("You Have No Right to Visite This Folder!");
window.location="c://";
return false;
}
}
getpass();
----->此时会弹出一个folther.htt文件给你编辑,
2) 如果原来已经存在这个文件,里面会有很多内容,注意找到
<script>
......
...
..
</script>
之间的内容,在任何一个函数后面:例如:
Function SanatizeString(data){
....
...
..
}
//这里输入密码程序
function getpass()
{
var PW=prompt("Please Input Your Password:","");
if (PW!="你的密码")
{
alert("You Have No Right to Visite This Folder!");
window.location="c://";
return false;
}
}
getpass();
本文介绍了一种通过修改文件夹的folther.htt文件来实现密码保护的方法。具体步骤包括定位到该文件并添加JavaScript代码以提示用户输入密码,只有正确输入预设密码才能访问文件夹内容。
150

被折叠的 条评论
为什么被折叠?



