2 回答
TA贡献1828条经验 获得超4个赞
楼上的有点问题
function ChangeColor()
{
document.getElementById('<%= Button1.ClientID %>').style.color = "red";
}
后面一个方法也这么改
TA贡献1810条经验 获得超4个赞
<head runat="server">
<title>无标题页</title>
<script type="text/javascript" language="javascript">
function ChangeColor()
{
document.getElementById("Button1").style.color="red";
}
function Resume()
{
document.getElementById("Button1").style.color="black";
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div >
<asp:Button ID="Button1" onmouseout="Resume();" onmouseover="ChangeColor();" runat="server" OnClick="Button1_Click" Text="Button" /></div>
</form>
</body>
- 2 回答
- 0 关注
- 777 浏览
添加回答
举报