copy whole html table to clipboard javascript

前端 未结 8 1684
暗喜
暗喜 2021-01-05 06:58

I have write javascript to select the table but I want to now automaticaly copy it after the click of the button.Please help me.My javascript is like this.

f         


        
8条回答
  •  悲&欢浪女
    2021-01-05 07:34

    • This has worked for me, it is not only restricted to table, but it can even select and copy to clipboard all elements inside Node specified with id.

    • I have tested in Mac Chrome as well as windows chrome.

    • Usescase : Copy Signature created by Signature Generator based on JS

    Demo :

    The Company Name

    Firstname Lastname    Designation

    youreamil@xyz.com   



提交回复
热议问题