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.
我无法复制输入字段值。
我试过这个步骤。
fiddle1 可以复制文本。(不加载 Zepto.js)
fiddle2 无法复制文本。(加载 Zepto.js)
我认为原因在于 Zepto。
你知道吗?
好吧,我不确定我是否理解您的问题或您尝试的解决方案,因为您没有发布任何代码,但是使用 Zepto(或 jQuery)您会得到如下输入值:
var userInput = $('#input_id').val() // then you can do whatever with it, like writing it to an alert alert(userInput)