✔ 最佳答案
除非你整個網頁是用flash來做, 否則很難隱藏html code的, 就算你用asp.net, php或jsp都不能的, 以下是一個防右鍵的javascript, 來提高被看到html碼的難度, 總之, 你放上網, 便有心理準備給人家抄走,
<script language=JavaScript& gt;
<!--
//Disable right mouse click Script
//By Maximus (
[email protected]) w/ mods by DynamicDrive
//For full source code, visit
http://www.dynamicdr ive.com
var message="Functi on Disabled!";
//////////////////// ///////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementB yId&&!docume nt.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}
if (document.layers){
document.captureEven ts(Event.MOUSEDOWN);
document.onmousedown =clickNS4;
}
else if (document.all&&a mp;!document.getElem entById){
document.onmousedown =clickIE4;
}
document.oncontextme nu=new Function("alert (message);return false")
// -->
</script>