hide html code

2007-04-26 6:12 am
怎樣才可hide html code,是否一定要用asp.net,應該點呀?請高人指點!

回答 (1)

2007-04-26 6:37 am
✔ 最佳答案
除非你整個網頁是用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>


收錄日期: 2021-04-13 16:47:01
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20070425000051KK04730

檢視 Wayback Machine 備份