开发者

Jquery: change input file value inside an iframe

I have a page where there is an input file. In this page there also is an iframe that contains another input file.

So, when the input file in main page changes, I want that the input file inside iframe also changes its value to the value of external input file.

But it doesn't work, i use this code in main page:

$('#iframe').contents().开发者_高级运维find('#input_file').val(myvalue);

The value of #input_file file remains empty. What could be the problem


You cannot change the value of a file input (for security reasons).

See: Dynamically set value of a file input

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜