我正在做一个网站图库,我想要下载按钮自动开始一个图像的下载。
我的代码如下:
<form id='agreeform' method='post' action='images/gallery/cards/t_01.jpg'>
<p>Terms and conditions go here.</p>
<div id='remositorylicenseagree'>
<input name='agreecheck' type='checkbox' onclick='enabledl()' /><strong>I agree to the above terms.</strong>
<input class="button" id='remositorydlbutton' type="submit" value="Download" />
<input type="hidden" name="da" value="40a7068dfda9732133af1ec9254fc94e" />
</div>
</form>发布于 2013-10-15 21:55:31
试试这个:
<form method="get" action="image.jpg">
<button type="submit">Download</button>
</form>或者,您可以尝试使用一个新的HTML5下载属性:
<a download='image.jpg'>Download</a>https://stackoverflow.com/questions/19391754
复制相似问题