正文

用javascript操作asp.net label控件 外一篇2008-08-21 20:16:00

【评论】 【打印】 【字体: 】 本文链接:http://blog.pfan.cn/yzrj/37780.html

分享到:

<%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> </script> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>无标题页</title> <style type="text/css" > .wang { color:white; background-color:red; } .ai { color:yellow; background-color:green; display:inline-block; border-width:1px; border-style:Solid; } .hui { color:blue; background-color:orange; display:inline-block; border-width:1px; border-style:Solid; } </style> <script language="javascript" type="text/javascript"> function mouseOver() { var label1=document.getElementById("Label1"); label1.className="ai"; return false; } function mouseOut() { var label1=document.getElementById("Label1"); label1.className="hui"; return false; } </script> </head> <body> <form id="form1" runat="server"> <div> <asp:Label ID="Label1" runat="server" CssClass="wang" onmouseover="mouseOver();" onmouseout="mouseOut();" Text="曲阳变化大了,我也好久没回去了,有点怀念它了." BorderStyle="Solid" BorderWidth="1px"></asp:Label> </div> </form> </body> </html>

阅读(1895) | 评论(0)


版权声明:编程爱好者网站为此博客服务提供商,如本文牵涉到版权问题,编程爱好者网站不承担相关责任,如有版权问题请直接与本文作者联系解决。谢谢!

评论

暂无评论
您需要登录后才能评论,请 登录 或者 注册