I have开发者_如何学Python been using cloneNode
in Firefox and it is working fine. But in Chrome it doesn't work as I expected. The cloneNode
method does clone the node but it doesn't clone the value of the node if the node is file(<input type="file">
).
Anyone know how to fix this problem?
Just a quick clarification: are you using element.cloneNode(true)
or element.cloneNode(false)
?
Assuming you're using true
, then I would recommend filing a bug at http://crbug.com
For security reasons, I highly doubt you'll be able to change the value
property, so your best bet is to restructure your program so it no longer needs to clone, until the Chrome team decides to fix this.
精彩评论