开发者

cloneNode does not clone the value of file upload elements in Google Chrome

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜