JQuery obtains the clipboard content.
This document describes how jQuery obtains the clipboard content. We will share this with you for your reference. The details are as follows:
In the past two days, I got the fckeditor pasting function. As I went deep into my work and looked up information online, I realized that the "Clipboard" is generally not allowed to be accessed on the webpage, this poses a great security risk. I also tried to write a simple demo.
In IE and FF, clipboard access is controllable, but access is not allowed in Opera, Chrome, and Safari browsers, which leads to browser compatibility issues, how can we make other browsers compatible with this function? I found some information on the Internet-"access the clipboard using flash" and then gave the obtained value to JS, this indirectly accesses the content in the clipboard.
The following code only supports IE and FF. It is a demo I found online. I just summarized it here:
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">