asp.net里面LinkButton控件的用法

asp.net里面LinkButton控件的用法,第1张

你的意思是不是不提交光变颜色啊

LinkButton翻译成

html

标记是

a

链接

所以只要想办法改变a链接的颜色就可以了

如果页面所有的链接都一种样式的话,用jquery:

$("a").click(function

()

{

$("a").css("color","black")

$(this).css("color",

"red")

return

false

})

还可以在样式表中设样式

方法很多的

在新建的Flex项目中的默认包中,新建一个Flex应用程序“LinkButton.mxml”,

窗口由源代码编辑切换成设计视图,找到组件视图,直接将LinkButton控件拖到设计视图窗口,

修改LinkButton的标签和文本字体大小,

将窗口由设计视图窗口切换到源代码编辑窗口,

给LinkButton点击事件click="clickHandler(event)"

protected function clickHandler(event:MouseEvent):void

{

}

在事件函数打印结果

import mx.controls.Alert

/**

* LinkButton单击事件函数

*/

protected function clickHandler(event:MouseEvent):void

{

    Alert.show(event.currentTarget.toString())

}

运行应用程序,并单击按钮

每个控件都有location属性,在你赋值的时候你可以设置linkbutton的location属性来控制它的位置

this.Linkbutton1.location=new point(5,5)

this.linkbutton2.Text="3329u3djfagewf"//linkbutton赋值

this.linkbutton2.location =new point(this.linkbutton1.X+this.linkbutton1.width+3,this.linkbutton1.Y)//这里确定linkbutton2的位置,与linkbutton1的间距是3


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/tougao/11981537.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-20
下一篇 2023-05-20

发表评论

登录后才能评论

评论列表(0条)

保存