日期:2014-05-18 浏览次数:21026 次
<style> .CssStyle1 { font: 12pt verdana; font-weight:700; color:orange; } .CssStyle2 { font: 15pt times; font-weight:250; color:blue; } </style> <script language="C#" runat="server"> void Button1_Click(Object sender, EventArgs e) { HyperLink1.CssClass=((HyperLink1.CssClass=="CssStyle1")?"CssStyle2":"CssStyle1"); } </script>
------解决方案--------------------
<style>
.CssStyle1
{
font: 12pt verdana;
font-weight:700;
color:orange;
}
.CssStyle2
{
font: 15pt times;
font-weight:250;
color:blue;
}
</style>
<script language="C#" runat="server">
void Button1_Click(Object sender, EventArgs e) {
HyperLink1.CssClass=((HyperLink1.CssClass=="CssStyle1")?"CssStyle2":"CssStyle1");
}
</script>
利用css控制