"标题"属性,与LT; HTML:选项> Struts标签 [英] "title" attribute for <html:options> struts tag

查看:167
本文介绍了"标题"属性,与LT; HTML:选项> Struts标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在常规的选择框,你可以使用title属性中的选项栏显示鼠标悬停完整的标题。

In a regular select box you can show the full title on mouseover using "title" attribute in the "option" field.

在Apache的Struts中,您的选择框HTML:选项标签。我不认为这个标签支持title属性。是否有另一种方式来显示鼠标悬停一个选项的完整标题为HTML:选择?Struts标签

In Apache Struts, you make the select box with the "html:options" tag. I don't think this tag supports the "title" attribute. Is there another way to show the full title of an option on mouseover for the "html:options" struts tag?

感谢

推荐答案

在HTML或JSP文件硬code是一个糟糕的code的做法。

hard code in html or jsp file is a bad code practice.

如果你正在写在Struts 1.x的code尝试将所有邮件存储在MessageResources_en.properties

if you are writing code in struts 1.x try to store all messages in MessageResources_en.properties

尝试用以下更新您的JSP(或者去)

try update your jsp with following (alternatively go for )

title="<bean:message key="your_tool_tip"/>

和修改MessageResources_en.properties

and modify MessageResources_en.properties

your_tool_tip=toolTIp is a cool idea

PS有jQuery中提供以及解决方案

ps there are solutions available in jquery as well

这篇关于&QUOT;标题&QUOT;属性,与LT; HTML:选项&gt; Struts标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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