<script>
function getimging() {
event.returnValue=false;
show.window.location.href=event.srcElement.src;
}
function getimged() {
event.returnValue=false;
show.document.execCommand("SaveAs");
}
</script>
<img src="csdn.gif" oncontextmenu="getimged()" onmouseover="getimging()">
<iframe src="" name=show style="width:0;height:0"></iframe>
这个有问题,
请大家看看吧...<script>
function getimg() {
event.returnValue=false;
show.window.location.href=event.srcElement.src;
show.document.execCommand("SaveAs");
}
</script>
<img src="csdn.gif" oncontextmenu="getimg()">
<iframe src="" name=show style="width:0;height:0"></iframe>

解决方案 »

  1.   

    呵呵.问题解决..
    这样就OK了....<script>
    function getimg() {
    event.returnValue=false;
    show.window.location.href=event.srcElement.src;
    timer=setInterval(checkload,100)
    }
    function checkload(){
    if(show.readyState!="complete")
    {show.document.execCommand("SaveAs");
      clearInterval(timer)}
    }</script>
    <img src="csdn.gif" oncontextmenu="getimg()">
    <img src="aspplus2.gif" oncontextmenu="getimg()">
    <iframe src="" name=show style="width:0;height:0"></iframe>
      

  2.   

    在<head>与</head>之间插入:<head>
    <style>
    select{font-size:9pt; }
    </style>
    </head>
    <!-- 9pt也可改为你想要的大小 -->