用这个函数:<script>function copyContent(){
  with(window.fraBlank.document){
  open();
write(document.all.tblCopy.outerHTML);
close();
execCommand('SelectAll');
execCommand('Copy');
execCommand('Unselect'); 
  }
}
</script>
<table id="tblCopy"><tr><td>
    <select name="t1">
        <option value="999">123456789</option>
    </select>
<img src="http://community.csdn.net/images/ad/banner050524.jpg">
<input type="button" value="test" >
<input type="button" onClick="copyContent()" value="copy">复制这个表格内的内容tttttttttt
</td></tr></table>
<iframe name="fraBlank" width="0" height="0" frameborder="0"></iframe>

解决方案 »

  1.   

    to baiyunfei(虚度残生)  不行的。因为它是在读取一个图库的所有图片的。
      

  2.   

    不是好明白。你可以变通一下:
    <script>function copyContent(id){
      with(window.fraBlank.document){
      open();
    write(document.all(id).outerHTML);
    close();
    execCommand('SelectAll');
    execCommand('Copy');
    execCommand('Unselect'); 
      }
    }
    </script>
    <span id="spn1" onclick="copyContent('spn1');">文字文字<img src="http://netserver:92/images/logo_img.jpg" ></span><br>
    <span id="spn2" onclick="copyContent('spn2');"><img src="http://community.csdn.net/images/ad/banner050524.jpg"></span>
    <iframe name="fraBlank" width="0" height="0" frameborder="0"></iframe>