如何使网页不能查看源文件也不能另存为?

来源:百度知道 编辑:UC知道 时间:2024/09/28 09:12:40
如何使网页不能查看源文件也不能另存为?
谁能提供完整语句吗?

简单的:
在页面插入如下代码:
<noscript>
<iframe src="*.html;*.htm;*.mht;*.txt"> </iframe>
</noscript>防止另存为
下面防右键
<SCRIPT>
//
function rf()
{return false; }
document.oncontextmenu = rf
function keydown()
{if(event.ctrlKey ==true || event.keyCode ==93 || event.shiftKey ==true){return false;} }
document.onkeydown =keydown
function drag()
{return false;}
document.ondragstart=drag
function stopmouse(e) {
if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2))
return false; }
document.onmousedown=stopmouse;
if (document.layers)
window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=stopmouse;

</SCRIPT>

以上为简单的保护设置。

有效的解决:

<%
response.write"网页源代码"
%>

写个JavaScrip