我希望有一个包含多个输入但不使用<input type=submit>
或<button>
的表单。 (因为IE不支持按钮,<input type="submit">
显示文本值,我想要一个图像而不是按钮内的文本。问题是该表单发送“null”值而不是value="${CdFile.path}"
谢谢你的帮助!
<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>
答案 0 :(得分:0)
您无法在按钮内添加图像,但可以在超链接标记内嵌入图像
<a href="http://example.com/data.zip">
<img src="/image.jpg" alt="download">
</a>
这会将图像转换为按钮