Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何在twitter boostrap中创建表单中的图像按钮?_Html_Css_Twitter Bootstrap - Fatal编程技术网

Html 如何在twitter boostrap中创建表单中的图像按钮?

Html 如何在twitter boostrap中创建表单中的图像按钮?,html,css,twitter-bootstrap,Html,Css,Twitter Bootstrap,目前,我有这样的图片: <img src="xyz.jpg" width="80" height="80" id = "wp" alt="wp"> <img src = "abc.jpg" width="80" id = "tm" height="80" alt="tm"> 问题是,我无法根据单击的图像将值插入表单。图像也不会显示为按钮,因此对手机和平板电脑没有准确的响应。如何操作?您可以使用提交表单,还可以在按钮内添加图像标签 <button na

目前,我有这样的图片:

    <img src="xyz.jpg"  width="80" height="80" id = "wp" alt="wp">
 <img src = "abc.jpg"  width="80" id = "tm" height="80" alt="tm">
问题是,我无法根据单击的图像将值插入表单。图像也不会显示为按钮,因此对手机和平板电脑没有准确的响应。如何操作?

您可以使用
提交表单,还可以在按钮内添加图像标签

<button name="buttonName" value="buttonValue" type="submit">
   <img src="xyz.jpg" alt="" />
</button>

您可以使用


首先,据我所知,移动开发中没有“点击”事件,您应该研究jquery mobile(特别是vclick()事件)。这来自他们的移动文档:虚拟鼠标事件背后的想法是将触摸事件转换为鼠标事件,以补偿丢失的鼠标事件触发器。开发人员应该知道,这些虚拟化鼠标事件不会阻止在触摸事件后在浏览器内部触发任何合成鼠标事件。
<button name="buttonName" value="buttonValue" type="submit">
   <img src="xyz.jpg" alt="" />
</button>
<input type="image" src="http://www.luvvitt.com/skin/frontend/default/luvvitt/images/submit.png" alt="Submit Form" class="btn"/>