本文转载自
http://www.corange.cn/archives/2008/11/2426.html
今天中午到一个常去的网站copy图片,点击右键后发现尽然是不能拷贝的了,仔细一看是一个FLASH,将源码打开找到了路径。打开图片路径将事情做完,完成后就研究一下这个代码,觉得不错,共享一下(corange好久没有发我自己从网站上下下来的代码了)
效果图
本站原创,转载请注明www.corange.cn
<DIV
id=Layer1><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> <SPAN
class=STYLE5
style="FILTER: alpha(opacity=40); WIDTH: 360px; HEIGHT: 50px">ASP,PHP,JSP,JS,ASP.NET,DIV,CSS等网站建设相关技术<BR>http://www.corange.cn<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>欢迎常来逛逛</SPAN></DIV><!--flash显示图片开始-->
<DIV align=center>
<SCRIPT language=javascript>
var focus_width=480
var focus_height=360
var text_height=0
var swf_height = focus_height+text_height
var pics = '';
var links = '';
var texts = '';
function ati(url, img, title)
{
if(pics != '')
{
pics = "|" + pics;
links = "|" + links;
texts = "|" + texts;
}
pics = escape(img) + pics;
links = escape(url) + links;
texts = title + texts;
}
</SCRIPT>
<SCRIPT language=javascript>
ati('#', 'uploadfiles/1.jpg', 'Star necklace');
document.write('<embed src="flash/focus3.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#DADADA" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"/>');
</SCRIPT>
</DIV><!--flash显示图片结束--></TD></TR></TBODY></TABLE><!--显示配置图开始-->
<DIV align=center>
<SCRIPT language=javascript>function checkProNum(form1){ if (form1.productnum.value < 2 ) { alert('该商品不能低于最小起订量2piece!'); form1.productnum.focus(); form1.productnum.select();return false;}return true}</SCRIPT>
<SCRIPT language=javascript><!--function checkspace(checkstr) { var str = ''; for(i = 0; i < checkstr.length; i++) { str = str + ' '; } return (str == checkstr);}function check(){ if(checkspace(document.pinglunform.CommentName.value)) { document.pinglunform.CommentName.focus(); alert('Please input name!'); return false; } if(checkspace(document.pinglunform.CommentTitle.value)) { document.pinglunform.CommentTitle.focus(); alert('Please input title!'); return false; } if(checkspace(document.pinglunform.CommentContent.value)) { document.pinglunform.CommentContent.focus(); alert('Please input content!'); return false; } }//--></SCRIPT>
</DIV>
CSS代码
<STYLE type=text/css>#Layer1 {
Z-INDEX: 1; WIDTH: 400px; POSITION: absolute; HEIGHT: 50px
}
.STYLE5 {
FONT-WEIGHT: bold; FONT-SIZE: 11pt; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
</STYLE>
全部打包下载
http://www.corange.cn//uploadfiles/flash_mark_37784.rar
下载后运行即可看到效果