h:带有Twitter引导程序或其他图标的commandButton [英] h:commandButton with twitter bootstrap or other icon

查看:92
本文介绍了h:带有Twitter引导程序或其他图标的commandButton的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Twitter Bootstrap CSS进行样式设置.要在其中制作图标按钮,标准方法是使用"i"标签. <button type="submit"><i class="icon-search"></i></button>.

但是我不能在里面输入 <h:commandButton id="myid"><i class="icon-search"></i></h:commandButton> 如何在呈现的<h:commandButton>中添加HTML?

I am using twitter bootstrap css to style. To make icon buttons in it, the standard way is to use "i" tags. <button type="submit"><i class="icon-search"></i></button>.

But I cant enter it within <h:commandButton id="myid"><i class="icon-search"></i></h:commandButton> How can I add HTML within the rendered <h:commandButton> ?

推荐答案

您可以在h:commandLink

命令链接可以设置为按钮

Command link could be styled as button

<h:commandLink id="btnsearch"
    action="search.xhtml"
    styleClass="btn btn-default">
    <i class="icon-search"></i> Search
</h:commandLink>

这篇关于h:带有Twitter引导程序或其他图标的commandButton的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆