Clipboard access using Javascript - sans Flash?

前端 未结 8 1285
你的背包
你的背包 2020-12-20 13:12

Is there a reliable way to access the client machine\'s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google D

8条回答
  •  攒了一身酷
    2020-12-20 13:43

    Since this is a big security risk, all browsers that care about safety don't allow JS to access the clipboard.

    The main reason is that many people put their passwords into a text file and then use cut&paste to login. Crackers could then collect the password (and possibly other private information like the word document which you just copied) from the clipboard by cracking a popular site and installing some JS that sends them the content of the clipboard.

    Which is why I have flash disabled all the time.

提交回复
热议问题