`
yong7181000
  • 浏览: 29702 次
  • 性别: Icon_minigender_1
  • 来自: 西安
社区版块
存档分类
最新评论

百度空间的文章不能另存为Mht?无法保存网页?那是不存在的事情!!!

阅读更多
看到空间的文章 另存为的时候总是提示无法保存网页。甚是烦人。

网上查了查,是因为在页面中写了iframe的原因

解决方法:

将下面代码

javascript:var f = document.getElementsByTagName("iframe"); for(var i=0; i<f.length;i++) f[i].src=""; void(0);

复制到要保存的网页的地址栏然后回车

就可以保存了。

一些禁止保存的例子

1. oncontextmenu="window.event.returnValue=false" 将彻底屏蔽鼠标右键

<table border oncontextmenu=return(false)><td>no</table> 可用于Table

2. <body onselectstart="return false"> 取消选取、防止复制



3. onpaste="return false" 不准粘贴



4. oncopy="return false;" oncut="return false;" 防止复制



5. <link rel="Shortcut Icon" href="favicon.ico"> IE地址栏前换成自己的图标



6. <link rel="Bookmark" href="favicon.ico"> 可以在收藏夹中显示出你的图标



7. <input style="ime-mode:disabled"> 关闭输入法



8.防止被人frame

<SCRIPT LANGUAGE=javascript><!--

if (top.location != self.location)top.location=self.location;

// --></SCRIPT>



9. <noscript><iframe src=*.html></iframe></noscript> 网页将不能被另存为



10. <input type=button value=查看网页源代码

onclick="window.location = 'view-source:'+ 'http://www.***.net/'">

其他例子

18. 网页不会被缓存
HTM网页
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
或者<META HTTP-EQUIV="expires" CONTENT="0">
ASP网页
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.cachecontrol = "no-cache"
PHP网页
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");

20. 获得一个窗口的大小
document.body.clientWidth,document.body.clientHeight

21. 怎么判断是否是字符
if (/[^\x00-\xff]/g.test(s)) alert("含有汉字");
else alert("全是字符");

22.TEXTAREA自适应文字行数的多少
<textarea rows=1 name=s1 cols=27 onpropertychange="this.style.posHeight=this.scrollHeight">
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics