如何选择和取消选择一个链接按钮,有人帮助我。 [英] How to select and deselect an link button plz some one help me.
本文介绍了如何选择和取消选择一个链接按钮,有人帮助我。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用文本修饰来删除下划线,但我希望当我选择该行应该来的链接按钮时,同时取消选择下划线不应该来。
i am using text-decoration for removing underline but i want when i select the linkbutton that line should come and while deselect that underline should not come.
推荐答案
亲爱的Alok,
您可以使用计数器来完成链接按钮样式,如下所示。
假设您的HTML标记是 -
Dear Alok,
You can use a counter to manupulate the link button style as follows.
Suppose your HTML markup is-
<a href="#" style="text-decoration:none" id="googleLink">Google</a>
然后你的javascript代码将是,
Then your javascript code will be,
(功能(){
var counter = 0
(function () { var counter=0
( #googleLink)。click(function(){
if (counter%2 == 0 ){
("#googleLink").click(function () { if (counter%2 == 0) {
这篇关于如何选择和取消选择一个链接按钮,有人帮助我。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文