点击链接后出现另存为的弹出提示框,就可以保存页面了
WEBASP.NET
当前位置:
开发者网络
>>
网页特效
>>
综 合 类
>> 内容
精彩推荐
分类最新特效
分类热点特效
点击链接后出现另存为的弹出提示框,就可以保存页面了
日期:2005-07-01
人气:
【字体:
大
中
小
】【
收藏此文
】
<HTML> <HEAD> <META http-equiv='Content-Type' content='text/html; charset=gb2312'> <TITLE>点击链接后出现另存为的弹出提示框,就可以保存页面了</TITLE> </HEAD> <BODY bgcolor="#fef4d9" onload="isReady=true"> <script language="JavaScript"> // Source: CodeFoot.com // Please leave in this header. var isReady = false; function doSaveAs(){ if (document.execCommand){ if (isReady){document.execCommand("SaveAs");} }else{ alert('Feature available only in Internet Exlorer 4.0 and later.'); } } </script> <a href="javascript:doSaveAs()">保存本页</a> </BODY></HTML>
<!-- 网页特效代码由[中国WEB开发者网络:http://www.ChinaWebDev.com]提供! -->
<!-- 要实现此效果需要 2 个步骤: -->
<!-- 第 1 步: -->
<!-- 把<BODY>中的属性代码改为: -->
<BODY bgcolor="#fef4d9" onload="isReady=true">
<!-- 第 2 步: -->
<!-- 把下面的代码加到<BODY></BODY>区域中: -->
<script language="JavaScript">
// Source: CodeFoot.com
// Please leave in this header.
var isReady = false;
function doSaveAs(){
if (document.execCommand){
if (isReady){document.execCommand("SaveAs");}
}else{
alert('Feature available only in Internet Exlorer 4.0 and later.');
}
}
</script>
<a href="javascript:doSaveAs()">保存本页</a>