Submit a radio button as a file input
I have a set of radio buttons with values like this:
<input type="radio" value="http://www.foo.com/image1.jpg" />
<input t开发者_StackOverflowype="radio" value="http://www.foo.com/image2.jpg" />
<input type="radio" value="http://www.foo.com/image3.jpg" />
But on submit I'd like it to treat the selected radio as if it were a file input, using the value as it's value. I'd also like to do this with only HTML if at all possible, but if not I'm willing to use jQuery. Any thoughts?
This will not work.
In order for something to work as file input, the file needs to exist on local filesystem - and you can not get your web page to automatically save the file from a URL to a filesystem due to JS security restrictions.
精彩评论