Hirtshals >> Den her kode ???
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
<html>
<head>
<title>JavaScript - Browsers - Password Protect source code</title>
<script language=javascript>
<!-- // Begin hiding from old browsers
function right(evnt) {
if (navigator.appName.toUpperCase().match(/NETSCAPE/) != null) {
if (evnt.which >= 2){
var name = prompt(\"Enter password:\",\" \");
var pass = \"viewsource\";
if (name ==pass){
var addy = self.location;
window.location=\"view-source:\"+addy;
return false;
}
else{
alert(\"Incorrect password.\");
return false;
}
}
else{
return false;
}
}
else{
if (event.button>=2){
var name = prompt(\"Enter password:\",\" \");
var pass = \"viewsource\";
if (name ==pass){
var addy = self.location;
window.location=\"view-source:\"+addy;
return false;
}
else{
alert(\"Incorrect password.\");
return false;
}
}
else{
return false;
}
}
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
// End hiding -->
</script>
<style>
TD.format
{
COLOR: blue;
FONT-FAMILY: Verdana;
FONT-SIZE: 15px;
FONT-WEIGHT: bolder
}
TD.format A:active
{
COLOR: red;
TEXT-DECORATION: none
}
TD.format A:link
{
COLOR: blue;
TEXT-DECORATION: none
}
TD.format A:visited
{
COLOR: blue;
TEXT-DECORATION: none
}
TD.format A:hover
{
COLOR: red;
TEXT-DECORATION: none
}
</style>
</head>
<body bgcolor=\"#003399\">
<table bgColor=\"#000080\" border=\"1\" borderColorDark=\"#0000ff\" borderColorLight=\"#000000\" cellPadding=\"10\" cellSpacing=\"5\" width=\"100%\" height=\"98%\">
<tr>
<td height=\"1%\"><table border=\"0\" cellPadding=\"0\" cellSpacing=\"0\" width=\"100%\">
<tr>
<td class=\"format\"><IMG align=absMiddle alt=\"Author of this Script\" border=0 height=16 src=\"../../../images/doc.gif\" width=16 >
www.viewsource.dk</td> <td class=\"format\" align=\"right\"> JavaScript - Browsers - Password Protect Source code</td>
</tr>
</table>
</td>
</tr>
<tr>
<td vAlign=\"center\" height=\"80%\"><div align=\"center\"><center><table border=\"0\" cellPadding=\"0\" cellSpacing=\"0\" class=\"format\" width=\"500\">
<tr>
<td align=\"middle\" vAlign=\"top\" class=\"format\" width=\"500\">
Try to Right click the page.<br> The password is viewsource
</td>
</tr>
</table></center></div></td></tr>
<tr>
<td height=\"1%\"><table border=\"0\" cellPadding=\"0\" cellSpacing=\"0\" width=\"100%\">
<tr>
<td class=\"format\" align=\"middle\">FreeWare</td>
</tr>
</table>
</td>
</tr></table>
</body>
</html>