Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个整洁的小 javascript 数据网格,我希望人们能够将数据粘贴到其中。我知道访问剪贴板存在安全问题,但我想知道是否有办法做到这一点。对于最终用户来说,这是迄今为止最直观的方法。
有没有我可以用文本输入做的一些狡猾的黑客攻击?
浏览器中的 PASTE 不支持数据。它是纯文本的。我建议粘贴到文本区域,然后解析数据并将其插入到您的网格中。