按钮文本中的访问键的下划线 [英] underline of access key in buttons text

查看:85
本文介绍了按钮文本中的访问键的下划线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友



我目前有这个按钮,不知道如何在按钮文字中加下划线。我尝试添加&在我想要下划线的那封信之前,那些不起作用必须是一个菜单。

Dear Friends

I currently have this button and do not know how to get the F underlined in the button text. I tried adding the & before the letter I wanted underlined and that did not work must be a menu only thing.

<asp:Button ID="btnFilter" runat="server"  Text="Filter" AccessKey="F" />



我以为abo把它改成一个html按钮但是假设必须有一些方法来做它作为一个asp按钮。任何帮助将不胜感激。





谢谢&问候



pardeep


I thought about changing it to an html button but assumed there would have to be some way to do it as an asp button. Any help would be much appreciated.


Thanks & Regards

pardeep

推荐答案





试试这个:) [ ^ ]


你好,



你将无法使用asp:Button,但是使用HtmlButton你可以这样做,如下所示。

Hello,

You will not be able to do so with asp:Button however with HtmlButton you can do this as shown below.
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Data from Service ASPX</title>
<style type="text/css">
body { font-family: Verdana, Thaoma; }
button em { text-decoration: underline; font-style:normal;}
</style>
</head>
<body>
	<form id="form1" runat="server">
		<asp:Button ID="btnFilter" runat="server" Text="Filter" AccessKey="F" />
		<button ID="btnSubmit" runat="server" AccessKey="S"><em>S</em>ubmit</button>
	</form>
</body>
</html>



不同的浏览器在提供对 AccessKey 的支持方面会有所不同。请浏览维基百科文章,了解有关不同浏览器如何实现此行为的更多信息。



问候,


Different browser''s are going to differ in how they offer support for AccessKey. Please go through this wikipedia article to know more about how different browser''s implement this behaviour.

Regards,


使用此链接..

我觉得这个链接对你很有帮助。



of> Asp.net - 在按钮文本中为快捷键加下划线 [ ^ ]



谢谢&安培;关于

Shambhoo。
Use this link..
and i think this link really helpful to u..

Asp.net - underline for short cut key in the text of button[^]

Thanks & regard
Shambhoo.


这篇关于按钮文本中的访问键的下划线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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