62,046
社区成员
发帖
与我相关
我的任务
分享
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<!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 runat="server">
<title>无标题页</title>
<style type="text/css">
a
{
color: red;
font-size: 12px;
text-decoration: underline;
}
a:ACTIVE
{
color: #006699;
text-decoration: none;
}
a:FOCUS
{
color: black;
text-decoration: none;
}
a:HOVER
{
color: #FF0000;
font-size: 12px;
text-decoration: underline;
}
a:LINK
{
color: blue;
font-size: 12px;
text-decoration: underline;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:LinkButton ID="LinkButton1" runat="server" Text="LinkButton按钮"></asp:LinkButton>
</div>
</form>
</body>
</html>
<script type="text/javascript">
function mouseovered() {
document.getElementById("LinkButton1").setAttribute("style", "color: red;");
}
function mouseouted() {
document.getElementById("LinkButton1").removeAttribute("style");
}
</script>
<div>
<asp:LinkButton ID="LinkButton1" runat="server" Text="LinkButton按钮" onmouseover="mouseovered()" onmouseout="mouseouted()"></asp:LinkButton>
</div>