1 Source code Thu Aug 19, 2010 5:22 pm
Guest
Guest
Is there any way i can hide the source code of my website?
Thanks
Thanks
Joel wrote:Yes, you can report them
<SCRIPT LANGUAGE="Javascript"><!--
var isNS = (navigator.appName == "Netscape") ? 1 : 0;
var EnableRightClick = 0;
if(isNS)
document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
function mischandler(){
if(EnableRightClick==1){ return true; }
else {return false; }
}
function mousehandler(e){
if(EnableRightClick==1){ return true; }
var myevent = (isNS) ? e : event;
var eventbutton = (isNS) ? myevent.which : myevent.button;
if((eventbutton==2)||(eventbutton==3)) return false;
}
function keyhandler(e) {
var myevent = (isNS) ? e : window.event;
if (myevent.keyCode==96)
EnableRightClick = 1;
return;
}
document.oncontextmenu = mischandler;
document.onkeypress = keyhandler;
document.onmousedown = mousehandler;
document.onmouseup = mousehandler;
//-->
</script>
<script type="text/javascript>
var message="You can't see the page code"
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
</script>
Unknown Data wrote:That's "only" to prevent a person from right clicking.
It will not prevent the source code to be viewed.
WebArtz - The Web Design Forum » Web Designing & Coding » HTML (Hyper Text Markup Language) » Source code
Similar topics
Permissions in this forum:
You cannot reply to topics in this forum
|
|