我想要一个多重输入的表单,但不使用<input type=submit>
或<button>
。 (因为按钮不被IE支持,并且<input type="submit">
显示文本值,我想要一个图像而不是按钮内的文本)。问题是该表单发送“null”值而不是value="${CdFile.path}"
感谢您的帮助!如何在HTML表单中使用多个<input type =“image”>?
<form action="depending of the input choosen" method="post" id="ContactForm" enctype="multipart/form-data">
<table id="table_id" class="display" width="100%" cellspacing="1" cellpadding="0" border="1" align="left" bgcolor="#999999">
<caption> Files of current user</caption>
<thead>
<tr>
<th>Download</th>
<!--th>Directory</th-->
<th>file Name</th>
<th>document type</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<input type="image" width="50" name="subject" src=" http://res.cloudinary.com/virbac/image/upload/v1471939749/download_smaflx.png" border="0" alt="Submit" value="${CdFile.path}" />
</td>
<!--td>${CdFile.folder}</td-->
<td>${CdFile.fileName}</td>
<td>${CdFile.docType}</td>
<td>${CdFile.date}</td>
</tr>
<tr>
<td>
<input type="image" width="50" name="subject" src=" http://res.cloudinary.com/virbac/image/upload/v1471939749/download_smaflx.png" border="0" alt="Submit" value="${CdFile.path}" />
</td>
<!--td>${CdFile.folder}</td-->
<td>${CdFile.fileName}</td>
<td>${CdFile.docType}</td>
<td>${CdFile.date}</td>
</tr>
<tr>
<td>
<input type="image" width="50" name="subject" src=" http://res.cloudinary.com/virbac/image/upload/v1471939749/download_smaflx.png" border="0" alt="Submit" value="${CdFile.path}" />
</td>
<!--td>${CdFile.folder}</td-->
<td>${CdFile.fileName}</td>
<td>${CdFile.docType}</td>
<td>${CdFile.date}</td>
</tr>
</tbody>
</table>
</form>
你能更清楚一点你的问题吗 –
是的,当然,我有一些服务器上的文件,我想让他们downloada可见,我的表单实际上与传统的输入一起工作,输入的值是文件的路径。但是这个值显示在按钮中,我想要一个图像而不是文本显示 – cryckx
所以当点击'输入[提交]'文件应该下载。或者它可以打开它在新标签页查看图像 –